File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 29
29
steps :
30
30
- uses : actions/checkout@v2
31
31
32
+ - name : Record settings for CI cloud
33
+ run : |
34
+ echo CI_CLOUD: ${{ env.CI_CLOUD }}
35
+
32
36
- name : Setup ssh
33
37
run : |
34
38
set -x
Original file line number Diff line number Diff line change 39
39
steps :
40
40
- uses : actions/checkout@v2
41
41
42
+ - name : Override CI_CLOUD if label is present
43
+ if : ${{ github.event_name == 'pull_request' }}
44
+ run : |
45
+ # Iterate over the labels
46
+ labels=$(echo '${{ toJSON(github.event.pull_request.labels) }}' | jq -r '.[].name')
47
+ echo $labels
48
+ for label in $labels; do
49
+ if [[ $label == CI_CLOUD=* ]]; then
50
+ # Extract the value after 'CI_CLOUD='
51
+ CI_CLOUD_OVERRIDE=${label#CI_CLOUD=}
52
+ echo "CI_CLOUD=${CI_CLOUD_OVERRIDE}" >> $GITHUB_ENV
53
+ fi
54
+ done
55
+
42
56
- name : Record settings for CI cloud
43
57
run : |
44
- echo CI_CLOUD: ${{ vars .CI_CLOUD }}
58
+ echo CI_CLOUD: ${{ env .CI_CLOUD }}
45
59
46
60
- name : Setup ssh
47
61
run : |
You can’t perform that action at this time.
0 commit comments