@@ -3,66 +3,58 @@ name: docker
33on :
44 push :
55 branches :
6- - ' master'
6+ - ' master'
77 tags :
8- - ' v*'
8+ - ' v*'
99 pull_request :
1010 branches :
11- - ' master'
11+ - ' master'
1212
1313jobs :
1414 docker :
1515 runs-on : ubuntu-latest
1616 steps :
17- -
18- name : Checkout
19- uses : actions/checkout@v2
20- -
21- name : Set up QEMU
22- uses : docker/setup-qemu-action@v1
23- with :
24- platforms : amd64,arm64
25- -
26- name : Set up Docker Buildx
27- uses : docker/setup-buildx-action@v1
28- -
29- name : Docker meta
30- id : meta
31- uses : docker/metadata-action@v3
32- with :
33- images : 42wim/matterbridge,ghcr.io/42wim/matterbridge
34- flavor : |
35- latest=true
36- tags : |
37- type=ref,event=branch
38- type=ref,event=pr
39- type=semver,pattern={{version}}
40- type=semver,pattern=stable
41- type=semver,pattern={{major}}
42- type=semver,pattern={{major}}.{{minor}}
43- -
44- name : Login to DockerHub
45- uses : docker/login-action@v1
46- if : github.event_name != 'pull_request'
47- with :
48- username : ${{ secrets.DOCKERHUB_USERNAME }}
49- password : ${{ secrets.DOCKERHUB_TOKEN }}
50- -
51- name : Log into registry ghcr.io
52- uses : docker/login-action@v1
53- if : github.event_name != 'pull_request'
54- with :
55- registry : ghcr.io
56- username : ${{ github.repository_owner }}
57- password : ${{ secrets.GITHUB_TOKEN }}
58- -
59- name : Build and push
60- id : docker_build
61- uses : docker/build-push-action@v2
62- with :
63- context : .
64- platforms : linux/amd64,linux/arm64
65- push : ${{ github.event_name != 'pull_request' }}
66- tags : ${{ steps.meta.outputs.tags }}
67- labels : ${{ steps.meta.outputs.labels }}
6817
18+ - name : Checkout
19+ uses : actions/checkout@v5
20+
21+ - name : Set up QEMU
22+ uses : docker/setup-qemu-action@v3
23+ with :
24+ platforms : amd64,arm64
25+
26+ - name : Set up Docker Buildx
27+ uses : docker/setup-buildx-action@v3
28+
29+ - name : Docker meta
30+ id : meta
31+ uses : docker/metadata-action@v5
32+ with :
33+ images : ghcr.io/${{ github.repository }}
34+ flavor : |
35+ latest=true
36+ tags : |
37+ type=ref,event=branch
38+ type=ref,event=pr
39+ type=semver,pattern={{version}}
40+ type=semver,pattern=stable
41+ type=semver,pattern={{major}}
42+ type=semver,pattern={{major}}.{{minor}}
43+
44+ - name : Log into registry ghcr.io
45+ uses : docker/login-action@v3
46+ if : github.event_name != 'pull_request'
47+ with :
48+ registry : ghcr.io
49+ username : ${{ github.repository_owner }}
50+ password : ${{ secrets.GITHUB_TOKEN }}
51+
52+ - name : Build and push
53+ id : docker_build
54+ uses : docker/build-push-action@v6
55+ with :
56+ context : .
57+ platforms : linux/amd64,linux/arm64
58+ push : ${{ github.event_name != 'pull_request' }}
59+ tags : ${{ steps.meta.outputs.tags }}
60+ labels : ${{ steps.meta.outputs.labels }}
0 commit comments