Skip to content

Commit

Permalink
Added test workflow for automatic merge (using test branches 'main_te…
Browse files Browse the repository at this point in the history
…st' and 'development_test')
  • Loading branch information
atteggiani committed Jul 22, 2024
1 parent 45ab999 commit 23761ea
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/automatic_merge.yml
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

0 comments on commit 23761ea

Please sign in to comment.