generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce a post-merge test PR (#38)
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Create a test PR after merge | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
create-pr: | ||
name: Create a test PR after merge | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
# We need a fresh base branch every time, | ||
# so that it doesn't contain the text that we want to merge with the PR. | ||
- name: Generate branch names | ||
id: generate_branches | ||
run: | | ||
timestamp=$(date +%Y-%m-%dT%H-%M) | ||
echo "base_branch=test_base_$timestamp" >> $GITHUB_OUTPUT | ||
echo "head_branch=test_head_$timestamp" >> $GITHUB_OUTPUT | ||
- name: Create a base branch | ||
run: | | ||
git push origin HEAD:${{ steps.generate_branches.outputs.base_branch }} | ||
- name: Create the changes for the PR | ||
run: | | ||
mkdir text | ||
cp src/examples/0014-improve-locking-mechanism-for-parachains.md ./text/ | ||
- name: Create a test PR | ||
uses: peter-evans/create-pull-request@5b4a9f6a9e2af26e5f02351490b90d01eb8ec1e5 # v5 | ||
with: | ||
base: ${{ steps.generate_branches.outputs.base_branch }} | ||
branch: ${{ steps.generate_branches.outputs.head_branch }} | ||
add-paths: | | ||
text/*.md | ||
title: "[Post-merge test] A test PR for testing the action" | ||
body: "@paritytech/opstooling This is a test PR created automatically because a recent change has been merged to master.\nUse `/rfc process 0x39fbc57d047c71f553aa42824599a7686aea5c9aab4111f6b836d35d3d058162` to process the PR and test out the code on `main`." |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ on: | |
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
rfc-action: | ||
|