Skip to content

Update test.yml

Update test.yml #20

Workflow file for this run

name: Test
on:
pull_request:
types:
- opened
jobs:
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
todraft:
runs-on: ubuntu-latest
steps:
- name: Set PR to draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -X PATCH \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Accept: application/vnd.github+json" \
-d '{"draft": true}' \
$(jq -r '.pull_request.url' <$GITHUB_EVENT_PATH)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
reqtest:
runs-on: ubuntu-latest
steps:
- name: test draft
if: github.event.pull_request.draft == 'false'
run: echo "The draft"
- name: test fair
if: github.event.pull_request.draft == 'true'
run: echo "The fair"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #