Skip to content

Commit 318b0ec

Browse files
committed
use 'draft' status
1 parent ce2cd94 commit 318b0ec

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

.github/workflows/jio.yaml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,11 @@ permissions:
3232
jobs:
3333
metadata:
3434
runs-on: ubuntu-22.04
35+
if: github.event.pull_request.draft == false || github.event_name != 'pull_request'
3536
outputs:
3637
BUILD_DATE: ${{ steps.date.outputs.BUILD_DATE }}
3738
PUBLISH: ${{ steps.if-publish.outputs.PUBLISH }}
3839
steps:
39-
- name: Cancel workflow run if the trigger is a draft PR
40-
id: cancel-if-draft
41-
if: github.event_name == 'pull_request' && github.event.pull_request.draft == true
42-
run: |
43-
echo "Cancelling workflow for draft PR"
44-
curl -X POST -H "Authorization: token ${{ github.token }}" \
45-
-H "Accept: application/vnd.github.v3+json" \
46-
"https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/cancel"
47-
while true; do sleep 1; done # blocks execution in case workflow cancellation takes time
48-
4940
- name: Set build date
5041
id: date
5142
shell: bash -x -e {0}

0 commit comments

Comments
 (0)