Skip to content

Commit

Permalink
Testing automatic sync
Browse files Browse the repository at this point in the history
  • Loading branch information
stefi07 committed Apr 17, 2024
1 parent 4db41d2 commit 391613d
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/upstream-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Sync with MagAOX upstream dev branch

permissions:
contents: write

on:
schedule:
- cron: '0 23 * * Sun'
workflow_dispatch:

jobs:
sync_dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# ref: fsm
fetch-depth: 0
- name: Get current branch
id: check_step
run: |
branch=$(git rev-parse --abbrev-ref HEAD)
echo "{name}=branch" >> $GITHUB_OUTPUT
echo "Branch is ${{ github.ref_name }})."
- name: Sync dev_upstream_sync with MagAOX dev branch
run: |
git remote add upstream https://github.com/magao-x/MagAOX.git
git fetch upstream
# git rebase upstream/dev && (echo "Success" && git push origin dev_upstream_sync) || (echo "Fail" && git rebase --abort)

sync_dev_dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# ref: dev_dev_upstream_sync
ref: dev
fetch-depth: 0
- name: Get current branch
id: check_step
run: |
branch=$(git rev-parse --abbrev-ref HEAD)
echo "{name}=branch" >> $GITHUB_OUTPUT
echo "Branch is ${{ github.ref_name }})."
- name: Sync dev_dev_upstream_sync with MagAOX dev branch
run: |
git remote add upstream https://github.com/magao-x/MagAOX.git
git fetch upstream
# git rebase upstream/dev && (echo "Success" && git push origin dev_dev_upstream_sync) || (echo "Fail" && git rebase --abort)

0 comments on commit 391613d

Please sign in to comment.