Create Jobs PR #27
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Create Jobs PR" | |
on: | |
create: # This event does not support branch filter (want `branches: jobs`, see if: below). | |
concurrency: | |
group: "jobs" | |
cancel-in-progress: false | |
jobs: | |
build: | |
name: "Create PR for jobs branch." | |
if: ${{ github.ref == 'refs/heads/jobs' }} | |
timeout-minutes: 1 | |
permissions: | |
# actions/checkout | |
contents: read | |
# `gh pr create` needs this. It also needs | |
# Settings > Actions > General > Workflow permissions > Allow GitHub Actions to create and approve pull requests | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout ${{ github.ref }} branch in ${{ github.repository }} repository." | |
uses: actions/checkout@v4 | |
with: | |
ref: jobs | |
- name: "Create PR" | |
env: | |
# Use token that's auto-created for this Job, see permissions: above. | |
GH_TOKEN: ${{ github.token }} | |
shell: bash | |
run: | | |
# Workaround for https://github.com/cli/cli/issues/5896 | |
git fetch origin main | |
gh pr create --fill-first |