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 58cebdf
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/automatic_merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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_test
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
git merge --no-ff -X theirs origin/development_test -m "Automatically merge 'development' to 'main'.
Merge commit issued by the automatic_merge workflow."
git push origin main_test

0 comments on commit 58cebdf

Please sign in to comment.