Skip to content

Commit 02c175f

Browse files
author
tylertitsworth
committed
scan only on pr
1 parent 93ad549 commit 02c175f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

.github/workflows/container-ci.yaml

+2-6
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ jobs:
110110
####################################################################################################
111111
setup-scan:
112112
needs: [build-containers]
113+
if: ${{ github.event_name == 'pull_request' }}
113114
runs-on: ubuntu-latest
114115
outputs:
115116
matrix: ${{ steps.scan-matrix.outputs.matrix }}
@@ -126,13 +127,8 @@ jobs:
126127
run: echo "matrix=$(cat matrix/*-${{ needs.build-containers.outputs.group }}/*.txt | jq -R '.' | jq -sc '. | unique')" >> $GITHUB_OUTPUT
127128
scan-containers:
128129
needs: [setup-scan]
129-
if: ${{ !inputs.no_build }}
130+
if: ${{ !inputs.no_build && github.event_name == 'pull_request' }}
130131
runs-on: k8-runners
131-
permissions:
132-
actions: read
133-
packages: read
134-
pull-requests: write
135-
security-events: write
136132
strategy:
137133
matrix:
138134
container: ${{ fromJSON(needs.setup-scan.outputs.matrix) }}

0 commit comments

Comments
 (0)