Skip to content

Commit 9b514b1

Browse files
committed
ci: Use our reusable GHA
1 parent 05d5787 commit 9b514b1

File tree

6 files changed

+36
-100
lines changed

6 files changed

+36
-100
lines changed

.github/workflows/docker-build.yml

Lines changed: 7 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -9,50 +9,13 @@ on:
99
tags:
1010
- "v*.*.*"
1111
pull_request:
12-
branches:
13-
- "main"
1412

1513
jobs:
1614
docker:
17-
runs-on: ubuntu-latest
18-
steps:
19-
- name: Checkout
20-
uses: actions/checkout@v3
21-
with:
22-
fetch-depth: 0
23-
24-
- name: Docker meta
25-
id: meta
26-
uses: docker/metadata-action@v4
27-
with:
28-
# list of Docker images to use as base name for tags
29-
images: |
30-
geokrety/prometheus
31-
# generate Docker tags based on the following events/attributes
32-
tags: |
33-
type=schedule
34-
type=ref,event=branch
35-
type=ref,event=pr
36-
type=semver,pattern={{version}}
37-
type=sha
38-
39-
- name: Set up QEMU
40-
uses: docker/setup-qemu-action@v2
41-
42-
- name: Set up Docker Buildx
43-
uses: docker/setup-buildx-action@v2
44-
45-
- name: Login to Docker Hub
46-
if: github.event_name != 'pull_request'
47-
uses: docker/login-action@v2
48-
with:
49-
username: ${{ vars.DOCKERHUB_USERNAME }}
50-
password: ${{ secrets.DOCKERHUB_TOKEN }}
51-
52-
- name: Build and push - base
53-
uses: docker/build-push-action@v4
54-
with:
55-
file: Dockerfile
56-
push: ${{ github.event_name != 'pull_request' }}
57-
tags: ${{ steps.meta.outputs.tags }}
58-
labels: ${{ steps.meta.outputs.labels }}
15+
uses: geokrety/geokrety-gha-workflows/.github/workflows/docker-build.yml@main
16+
with:
17+
image_name: geokrety/prometheus
18+
dockerhub_username: ${{ vars.DOCKERHUB_USERNAME }}
19+
dockerfile: Dockerfile
20+
secrets:
21+
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}

.github/workflows/pre-commit.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
1-
name: pre-commit
1+
name: lint
22

33
on:
44
pull_request:
55
push:
66
branches:
7-
- '*'
7+
- '!main'
88

99
jobs:
10-
11-
pre-commit:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v3
15-
16-
- uses: actions/setup-python@v4
17-
18-
- uses: pre-commit/[email protected]
10+
lint:
11+
uses: geokrety/geokrety-gha-workflows/.github/workflows/pre-commit.yml@main

.github/workflows/release.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Automatic release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-release:
10+
uses: geokrety/geokrety-gha-workflows/.github/workflows/release.yml@main
11+
secrets:
12+
GH_TOKEN: ${{ secrets.GH_TOKEN }}

.github/workflows/semantic-release.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/version-set.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Update version-set
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
jobs:
9+
update-version-set:
10+
uses: geokrety/geokrety-gha-workflows/.github/workflows/version-set.yml@main
11+
secrets:
12+
GH_TOKEN: ${{ secrets.GH_TOKEN }}

.versionset

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
geokrety_prometheus_image

0 commit comments

Comments
 (0)