Skip to content

Commit c679417

Browse files
authored
fix(build): Remove PR tagged images
Unfortunately, these only function for in org, and cause workflows from forks to fail
1 parent efe06f2 commit c679417

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

.github/workflows/build.yml

+6-9
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ on:
1010
- '**.txt'
1111
- 'repo_content/**'
1212
- 'spec_files/**'
13-
pull_request_review:
14-
type: [submitted]
1513
push:
1614
branches:
1715
- main
@@ -28,7 +26,6 @@ env:
2826
jobs:
2927
push-ghcr:
3028
name: Build and push image
31-
if: github.event.review.state == 'approved' || github.event_name != 'pull_request_review'
3229
runs-on: ubuntu-22.04
3330
permissions:
3431
contents: read
@@ -100,7 +97,7 @@ jobs:
10097
BUILD_TAGS+=("latest")
10198
fi
10299
103-
if [[ "${{ github.event_name }}" == "pull_request_review" ]]; then
100+
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
104101
echo "Generated the following commit tags: "
105102
for TAG in "${COMMIT_TAGS[@]}"; do
106103
echo "${TAG}"
@@ -167,7 +164,7 @@ jobs:
167164
- name: Push To GHCR
168165
uses: redhat-actions/push-to-registry@v2
169166
id: push
170-
if: github.event.review.state == 'approved' || github.event_name != 'pull_request'
167+
if: github.event_name != 'pull_request'
171168
env:
172169
REGISTRY_USER: ${{ github.actor }}
173170
REGISTRY_PASSWORD: ${{ github.token }}
@@ -182,18 +179,18 @@ jobs:
182179
183180
- name: Login to GitHub Container Registry
184181
uses: docker/login-action@v2
185-
if: github.event.review.state == 'approved' || github.event_name != 'pull_request'
182+
if: github.event_name != 'pull_request'
186183
with:
187184
registry: ghcr.io
188185
username: ${{ github.actor }}
189186
password: ${{ secrets.GITHUB_TOKEN }}
190187

191188
# Sign container
192189
- 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'
194191

195192
- name: Sign container image
196-
if: github.event.review.state == 'approved' || github.event_name != 'pull_request'
193+
if: github.event_name != 'pull_request'
197194
run: |
198195
cosign sign -y --key env://COSIGN_PRIVATE_KEY ${{ steps.registry_case.outputs.lowercase }}/${{ env.IMAGE_NAME }}@${TAGS}
199196
env:
@@ -202,6 +199,6 @@ jobs:
202199
COSIGN_PRIVATE_KEY: ${{ secrets.SIGNING_SECRET }}
203200

204201
- name: Echo outputs
205-
if: github.event.review.state == 'approved' || github.event_name != 'pull_request'
202+
if: github.event_name != 'pull_request'
206203
run: |
207204
echo "${{ toJSON(steps.push.outputs) }}"

0 commit comments

Comments
 (0)