Skip to content

Update test.yml

Update test.yml #26

Workflow file for this run

name: Test
on:
pull_request:
branches: [ main ]
jobs:
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
todraft:
runs-on: ubuntu-latest
steps:
- name: Set PR to draft
if: ${{ github.event.pull_request.draft == false }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo $GITHUB_EVENT_PATH
cat $GITHUB_EVENT_PATH
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 == true }}
run: echo "The draft"
- name: test fair
if: ${{ github.event.pull_request.draft == false }}
run: echo "The fair"
- name: test
run: echo ${{ github.event.pull_request.draft }}
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #