We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 151746c commit 9c3301cCopy full SHA for 9c3301c
.github/workflows/trivyscan.yml
@@ -25,6 +25,20 @@ jobs:
25
steps:
26
- uses: actions/checkout@v2
27
28
+ - name: Override CI_CLOUD if PR label is present
29
+ if: ${{ github.event_name == 'pull_request' }}
30
+ run: |
31
+ # Iterate over the labels
32
+ labels=$(echo '${{ toJSON(github.event.pull_request.labels) }}' | jq -r '.[].name')
33
+ echo $labels
34
+ for label in $labels; do
35
+ if [[ $label == CI_CLOUD=* ]]; then
36
+ # Extract the value after 'CI_CLOUD='
37
+ CI_CLOUD_OVERRIDE=${label#CI_CLOUD=}
38
+ echo "CI_CLOUD=${CI_CLOUD_OVERRIDE}" >> $GITHUB_ENV
39
+ fi
40
+ done
41
+
42
- name: Record settings for CI cloud
43
run: |
44
echo CI_CLOUD: ${{ env.CI_CLOUD }}
0 commit comments