11
11
- synchronize
12
12
paths-ignore :
13
13
- ' **.md'
14
+ issue_comment :
15
+ types : [created]
14
16
workflow_dispatch :
15
17
inputs :
16
18
PUBLISH :
66
68
DEFAULT_MANIFEST_ARTIFACT_NAME : bumped-manifest
67
69
68
70
jobs :
71
+ pre-flight :
72
+ runs-on : ubuntu-22.04
73
+ if : >
74
+ github.event_name == 'issue_comment' &&
75
+ github.event.issue.pull_request &&
76
+ contains(github.event.comment.body, '/cicd')
77
+ steps :
78
+ - name : Triggered by comment
79
+ shell : bash
80
+ run : exit 0
81
+
69
82
metadata :
70
83
runs-on : ubuntu-22.04
84
+ needs : pre-flight
71
85
outputs :
72
86
BUILD_DATE : ${{ steps.date.outputs.BUILD_DATE }}
73
87
PUBLISH : ${{ steps.if-publish.outputs.PUBLISH }}
@@ -77,15 +91,15 @@ jobs:
77
91
MERGE_BUMPED_MANIFEST : ${{ steps.manifest-branch.outputs.MERGE_BUMBED_MANIFEST }}
78
92
TEST_SUBSET : ${{ steps.testset.outputs.TEST_SUBSET }}
79
93
steps :
80
- - name : Cancel workflow run if the trigger is a draft PR
81
- id : cancel-if-draft
82
- if : github.event_name == 'pull_request' && github.event.pull_request.draft == true
83
- run : |
84
- echo "Cancelling workflow for draft PR"
85
- curl -X POST -H "Authorization: token ${{ github.token }}" \
86
- -H "Accept: application/vnd.github.v3+json" \
87
- "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/cancel"
88
- while true; do sleep 1; done # blocks execution in case workflow cancellation takes time
94
+ # - name: Cancel workflow run if the trigger is a draft PR
95
+ # id: cancel-if-draft
96
+ # if: github.event_name == 'pull_request' && github.event.pull_request.draft == true
97
+ # run: |
98
+ # echo "Cancelling workflow for draft PR"
99
+ # curl -X POST -H "Authorization: token ${{ github.token }}" \
100
+ # -H "Accept: application/vnd.github.v3+json" \
101
+ # "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/cancel"
102
+ # while true; do sleep 1; done # blocks execution in case workflow cancellation takes time
89
103
90
104
- name : Set build date
91
105
id : date
0 commit comments