Skip to content

[TEST] Push CI jobs for draft PRs to PR author's personal forks of Mill #2

[TEST] Push CI jobs for draft PRs to PR author's personal forks of Mill

[TEST] Push CI jobs for draft PRs to PR author's personal forks of Mill #2

Workflow file for this run

name: Draft CI
permissions: write-all
on:
pull_request_target:
jobs:
run:
if: github.event.pull_request.draft == true
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Get PR source repository URL
run:
echo "${{ github.event.pull_request.head.repo.html_url }}/commits/${{github.event.pull_request.head.ref}}"
- name: Create status
run: |
curl --request POST \
--url ${{ github.event.pull_request.statuses_url }} \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'content-type: application/json' \
--data '{
"state": "pending",
"context": "Draft CI / link",
"target_url": "${{ github.event.pull_request.head.repo.html_url }}/commits/${{github.event.pull_request.head.ref}}",
"description": "use github actions on your repo fork until this PR is ready for review"
}' \
--fail-with-body