1111      - synchronize 
1212    paths-ignore :
1313      - ' **.md' 
14+   issue_comment :
15+     types : [created] 
1416  workflow_dispatch :
1517    inputs :
1618      PUBLISH :
6668  DEFAULT_MANIFEST_ARTIFACT_NAME : bumped-manifest 
6769
6870jobs :
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+ 
6982  metadata :
7083    runs-on : ubuntu-22.04 
84+     needs : pre-flight 
7185    outputs :
7286      BUILD_DATE : ${{ steps.date.outputs.BUILD_DATE }} 
7387      PUBLISH : ${{ steps.if-publish.outputs.PUBLISH }} 
@@ -77,15 +91,15 @@ jobs:
7791      MERGE_BUMPED_MANIFEST : ${{ steps.manifest-branch.outputs.MERGE_BUMBED_MANIFEST }} 
7892      TEST_SUBSET : ${{ steps.testset.outputs.TEST_SUBSET }} 
7993    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
89103
90104      - name : Set build date 
91105        id : date 
0 commit comments