34
34
steps :
35
35
- name : Checkout repository
36
36
uses : actions/checkout@v4
37
-
37
+
38
38
- name : Convert image name to lowercase
39
39
run : |
40
40
GITHUB_REPOSITORY="${{ github.repository }}"
49
49
# Login against a Docker registry except on PR
50
50
# https://github.com/docker/login-action
51
51
- name : Log into registry ${{ env.REGISTRY }}
52
- if : github.event_name != ' pull_request'
52
+ if : ${{ ! github.event.pull_request || github.event.pull_request.base.repo.full_name == github.event. pull_request.head.repo.full_name }}
53
53
uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
54
54
with :
55
55
registry : ${{ env.REGISTRY }}
@@ -83,15 +83,15 @@ jobs:
83
83
platforms : ${{ matrix.platform }}
84
84
provenance : true
85
85
sbom : true
86
- outputs : type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=${{ !github.event.pull_request || github.event.pull_request.base.repo == github.event.pull_request.head.repo }}
86
+ outputs : type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=${{ !github.event.pull_request || github.event.pull_request.base.repo.full_name == github.event.pull_request.head.repo.full_name }}
87
87
- name : Export digest
88
- if : ${{ !github.event.pull_request || github.event.pull_request.base.repo == github.event.pull_request.head.repo }}
88
+ if : ${{ !github.event.pull_request || github.event.pull_request.base.repo.full_name == github.event.pull_request.head.repo.full_name }}
89
89
run : |
90
90
mkdir -p /tmp/digests
91
91
digest="${{ steps.build.outputs.digest }}"
92
92
touch "/tmp/digests/${digest#sha256:}"
93
93
- name : Upload digest
94
- if : ${{ !github.event.pull_request || github.event.pull_request.base.repo == github.event.pull_request.head.repo }}
94
+ if : ${{ !github.event.pull_request || github.event.pull_request.base.repo.full_name == github.event.pull_request.head.repo.full_name }}
95
95
uses : actions/upload-artifact@v3
96
96
with :
97
97
name : digests
@@ -100,7 +100,7 @@ jobs:
100
100
retention-days : 1
101
101
merge :
102
102
runs-on : ubuntu-latest
103
- if : ${{ !github.event.pull_request || github.event.pull_request.base.repo == github.event.pull_request.head.repo }}
103
+ if : ${{ !github.event.pull_request || github.event.pull_request.base.repo.full_name == github.event.pull_request.head.repo.full_name }}
104
104
needs :
105
105
- build
106
106
permissions :
@@ -135,4 +135,4 @@ jobs:
135
135
$(printf '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
136
136
- name : Inspect image
137
137
run : |
138
- docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}
138
+ docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}
0 commit comments