Skip to content

create-test-pr

create-test-pr #31

name: create-test-pr
on:
workflow_dispatch:
jobs:
create-test-pr:
runs-on: ubuntu-latest
steps:
- name: Check out test branch
uses: actions/checkout@v4
with:
ref: main-test
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@6d6857d36972b65feb161a90e484f2984215f83e # 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 }}
labels: make-pr-fail