create-test-pr #29
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-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@153407881ec5c347639a548ade7d8ad1d6740e38 # v5 | |
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 |