-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test workflow for automatic merge (using test branches 'main_te…
…st' and 'development_test')
- Loading branch information
1 parent
45ab999
commit 23761ea
Showing
1 changed file
with
32 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,32 @@ | ||
name: Automatic merge | ||
|
||
on: | ||
push: | ||
schedule: | ||
# Run every Sunday at 03:07 (AEDT) | ||
# AEDT is UTC+10 --> Sunday at 03:07 AEDT is Saturday at 17:07 UTC | ||
- cron: "7 17 * * SAT" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
auto-merge: | ||
runs-on: ubuntu-latest | ||
permissions: write-all | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@master | ||
with: | ||
ref: main | ||
fetch-depth: 0 | ||
token: ${{ secrets.ADMIN_TOKEN }} | ||
|
||
- name: Merge development to main | ||
run: | | ||
git config --global user.name "GitHub Actions" | ||
git config --global user.email "[email protected]" | ||
git checkout main_test # TODO: Delete | ||
git merge --no-ff -X theirs origin/development_test -m "Automatically merge 'development' to 'main'. # TODO: Delete | ||
# git merge --no-ff -X theirs origin/development -m "Automatically merge 'development' to 'main'. | ||
Merge commit issued by the automatic_merge workflow." | ||
# git push origin main | ||
git push origin main_test # TODO: Delete |