Skip to content

create-test-pr

create-test-pr #131

name: create-test-pr
on:
workflow_dispatch:
env:
TEST_BRANCH: main-test
jobs:
sync-branch:
name: Update test branch
runs-on: ubuntu-latest
steps:
- name: Check out main branch
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Check out main branch
uses: connor-baer/[email protected]
with:
branch: ${{ env.TEST_BRANCH }}
token: ${{ secrets.GITHUB_TOKEN }}
force: true
create-pr:
runs-on: ubuntu-latest
depends-on:

Check failure on line 26 in .github/workflows/create-test-pr.yml

View workflow run for this annotation

GitHub Actions / create-test-pr

Invalid workflow file

The workflow is not valid. .github/workflows/create-test-pr.yml (Line: 26, Col: 5): Unexpected value 'depends-on'
- sync-branch
steps:
- name: Check out test branch
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ env.TEST_BRANCH }}
persist-credentials: false
- name: Make changes
id: changes
run: |
echo >> README.md
number="${RANDOM}"
echo "${number}" >> README.md
echo "::set-output name=number::${number}"
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2
with:
app_id: ${{ secrets.GH_APP_ID }}
private_key: ${{ secrets.GH_APP_KEY }}
- name: Create pull request
id: create-pull-request
uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # v6
with:
token: ${{ steps.generate_token.outputs.token }}
title: Test Pull Request (${{ steps.changes.outputs.number }})
commit-message: Test commit.
branch: test-pr-${{ steps.changes.outputs.number }}