-
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.
- Loading branch information
1 parent
7bb3529
commit 684dcac
Showing
2 changed files
with
61 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,35 @@ | ||
name: Create PR to Main on release | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
repository: | ||
required: true | ||
type: string | ||
tag_name: | ||
required: true | ||
type: string | ||
prerelease: | ||
required: true | ||
type: boolean | ||
secrets: | ||
GITHUB_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
create-pr-to-main-on-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Abort if it's not a pre-release | ||
if: inputs.prerelease == false | ||
run: exit 1 | ||
- name: Checkout test branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: 'test' | ||
|
||
- name: Create Pull Request from tag branch to main | ||
run: | | ||
gh pr create --title "Release ${{ inputs.tag_name }}" --body "Release ${{ inputs.tag_name }}" --base main --head test --repo ${{ inputs.repository }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,26 @@ | ||
name: Sync test with main | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
repository: | ||
required: true | ||
type: string | ||
secrets: | ||
GITHUB_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
sync-test-with-main: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout main branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: 'main' | ||
|
||
- name: Create Pull Request from main to test | ||
run: | | ||
gh pr create --title "Sync test with main" --base test --head main --repo ${{ inputs.repository }} --label "sync" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |