-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add automerge PR main > develop
- Loading branch information
1 parent
d3ff9de
commit 3ffd07b
Showing
2 changed files
with
54 additions
and
2 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,52 @@ | ||
name: Auto PR from main to develop | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
update-develop: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Print github | ||
run: echo '${{ toJson(github) }}' | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Create Pull Request | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-message: Merge main into develop | ||
branch: auto-pr/merge-main-to-develop | ||
delete-branch: true | ||
title: Merge main into develop | ||
body: Merge main into develop | ||
base: develop | ||
labels: automerge | ||
|
||
- name: Check outputs | ||
if: ${{ steps.cpr.outputs.pull-request-number }} | ||
run: | | ||
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | ||
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" | ||
- name: Merge PR | ||
if: ${{steps.cpr.outputs.pull-request-number}} | ||
uses: pascalgn/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
MERGE_REMOVE_LABELS: automerge | ||
MERGE_METHOD: merge | ||
MERGE_COMMIT_MESSAGE: pull-request-title | ||
MERGE_FORKS: false | ||
PULL_REQUEST: ${{ steps.cpr.outputs.pull-request-number }} | ||
|
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