10
10
- ' **.txt'
11
11
- ' repo_content/**'
12
12
- ' spec_files/**'
13
- pull_request_review :
14
- type : [submitted]
15
13
push :
16
14
branches :
17
15
- main
28
26
jobs :
29
27
push-ghcr :
30
28
name : Build and push image
31
- if : github.event.review.state == 'approved' || github.event_name != 'pull_request_review'
32
29
runs-on : ubuntu-22.04
33
30
permissions :
34
31
contents : read
100
97
BUILD_TAGS+=("latest")
101
98
fi
102
99
103
- if [[ "${{ github.event_name }}" == "pull_request_review " ]]; then
100
+ if [[ "${{ github.event_name }}" == "pull_request " ]]; then
104
101
echo "Generated the following commit tags: "
105
102
for TAG in "${COMMIT_TAGS[@]}"; do
106
103
echo "${TAG}"
@@ -167,7 +164,7 @@ jobs:
167
164
- name : Push To GHCR
168
165
uses : redhat-actions/push-to-registry@v2
169
166
id : push
170
- if : github.event.review.state == 'approved' || github. event_name != 'pull_request'
167
+ if : github.event_name != 'pull_request'
171
168
env :
172
169
REGISTRY_USER : ${{ github.actor }}
173
170
REGISTRY_PASSWORD : ${{ github.token }}
@@ -182,18 +179,18 @@ jobs:
182
179
183
180
- name : Login to GitHub Container Registry
184
181
uses : docker/login-action@v2
185
- if : github.event.review.state == 'approved' || github. event_name != 'pull_request'
182
+ if : github.event_name != 'pull_request'
186
183
with :
187
184
registry : ghcr.io
188
185
username : ${{ github.actor }}
189
186
password : ${{ secrets.GITHUB_TOKEN }}
190
187
191
188
# Sign container
192
189
- uses : sigstore/cosign-installer@v3.1.1
193
- if : github.event.review.state == 'approved' || github. event_name != 'pull_request'
190
+ if : github.event_name != 'pull_request'
194
191
195
192
- name : Sign container image
196
- if : github.event.review.state == 'approved' || github. event_name != 'pull_request'
193
+ if : github.event_name != 'pull_request'
197
194
run : |
198
195
cosign sign -y --key env://COSIGN_PRIVATE_KEY ${{ steps.registry_case.outputs.lowercase }}/${{ env.IMAGE_NAME }}@${TAGS}
199
196
env :
@@ -202,6 +199,6 @@ jobs:
202
199
COSIGN_PRIVATE_KEY : ${{ secrets.SIGNING_SECRET }}
203
200
204
201
- name : Echo outputs
205
- if : github.event.review.state == 'approved' || github. event_name != 'pull_request'
202
+ if : github.event_name != 'pull_request'
206
203
run : |
207
204
echo "${{ toJSON(steps.push.outputs) }}"
0 commit comments