File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -13,14 +13,14 @@ jobs:
13
13
- uses : docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
14
14
15
15
- name : Login to dockerhub
16
- if : github.ref == 'refs/heads/master'
16
+ if : github.ref == format( 'refs/heads/{0}', github.event.repository.default_branch)
17
17
uses : docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3
18
18
with :
19
19
username : ${{ secrets.DOCKER_USERNAME }}
20
20
password : ${{ secrets.DOCKER_PASSWORD }}
21
21
22
22
- name : Login to GitHub
23
- if : github.ref == 'refs/heads/master'
23
+ if : github.ref == format( 'refs/heads/{0}', github.event.repository.default_branch)
24
24
uses : docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
25
25
with :
26
26
registry : ghcr.io
40
40
type=edge,branch=$repo.default_branch
41
41
42
42
- name : build+push
43
+ if : github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
43
44
uses : docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
44
45
with :
45
46
platforms : linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
46
- push : ${{ github.ref == 'refs/heads/master' }}
47
+ push : ${{ github.ref == format( 'refs/heads/{0}', github.event.repository.default_branch) }}
47
48
tags : ${{ steps.docker_meta.outputs.tags }}
48
49
labels : ${{ steps.docker_meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments