File tree Expand file tree Collapse file tree 3 files changed +44
-5
lines changed Expand file tree Collapse file tree 3 files changed +44
-5
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Docker image on release
2
+ on :
3
+ release :
4
+ types : [published]
5
+
6
+ jobs :
7
+ push_to_registries :
8
+ runs-on : ubuntu-24.04
9
+ matrix :
10
+ config :
11
+ - {name: base-r}
12
+ - {name: dev}
13
+ - {name: base-r-alpine}
14
+ name : ${{ matrix.config.name }}
15
+ steps :
16
+ - name : Check out the repo
17
+ uses : actions/checkout@v4
18
+ - name : Prepare tags
19
+ id : docker_meta
20
+ uses : docker/metadata-action@v5
21
+ with :
22
+ images : rapporteket/${{ matrix.config.image }}
23
+ tags : |
24
+ type=semver,pattern={{version}}
25
+ - name : Set up Docker Buildx
26
+ uses : docker/setup-buildx-action@v3
27
+ - name : Login to DockerHub
28
+ uses : docker/login-action@v3
29
+ with :
30
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
31
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
32
+ - name : Build and push to Docker Hub
33
+ uses : docker/build-push-action@v6
34
+ with :
35
+ context : ./${{ matrix.config.image }}/.
36
+ file : ./${{ matrix.config.image }}/Dockerfile
37
+ tags : ${{ steps.docker_meta.outputs.tags }}
38
+ labels : ${{ steps.docker_meta.outputs.labels }}
39
+ build-args : |
40
+ GITHUB_PAT=${{ secrets.GH_TOKEN }}
41
+ cache-from : type=gha
42
+ cache-to : type=gha,mode=max
Original file line number Diff line number Diff line change 1
1
name : Publish Docker image
2
2
on :
3
- release :
4
- types : [published]
5
3
push :
6
4
branches :
7
5
- main
@@ -17,7 +15,7 @@ concurrency:
17
15
18
16
jobs :
19
17
changes :
20
- runs-on : ubuntu-latest
18
+ runs-on : ubuntu-24.04
21
19
permissions :
22
20
pull-requests : read
23
21
outputs :
62
60
type=ref,event=branch
63
61
type=ref,event=pr
64
62
type=schedule,pattern=weekly
65
- type=semver,pattern={{version}}
66
63
- name : Set up Docker Buildx
67
64
uses : docker/setup-buildx-action@v3
68
65
- name : Login to DockerHub
Original file line number Diff line number Diff line change 16
16
17
17
jobs :
18
18
snyk :
19
- runs-on : ubuntu-latest
19
+ runs-on : ubuntu-24.04
20
20
strategy :
21
21
fail-fast : false
22
22
matrix :
You can’t perform that action at this time.
0 commit comments