2021-05-28 14:22:07 +00:00
|
|
|
# This is a basic workflow to help you get started with Actions
|
|
|
|
|
|
|
|
name: Downstream Branch Updates
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '20 7 * * *'
|
|
|
|
# scheduled at 07:00 every Monday and Thursday
|
|
|
|
|
|
|
|
workflow_dispatch: # click the button on Github repo!
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
sync_with_upstream:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Sync main with upstream latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
# Step 1: run a standard checkout action, provided by github
|
|
|
|
- name: Checkout main
|
2022-06-05 15:29:29 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-05-28 14:22:07 +00:00
|
|
|
with:
|
|
|
|
ref: main
|
|
|
|
# submodules: 'recursive' ### may be needed in your situation
|
|
|
|
|
|
|
|
# Step 2: run this sync action - specify the upstream repo, upstream branch to sync with, and target sync branch
|
|
|
|
- name: Pull (Fast-Forward) upstream changes
|
|
|
|
id: sync
|
2022-06-05 12:15:26 +00:00
|
|
|
uses: aormsby/Fork-Sync-With-Upstream-action@v3.3
|
2021-05-28 14:22:07 +00:00
|
|
|
with:
|
|
|
|
upstream_repository: AtlasMediaGroup/TotalFreedomMod
|
|
|
|
upstream_branch: main
|
2021-08-18 22:45:34 +00:00
|
|
|
target_branch: development
|
2021-05-28 14:22:07 +00:00
|
|
|
git_pull_args: --ff-only # optional arg use, defaults to simple 'pull'
|
|
|
|
|
|
|
|
# Step 3: Display a message if 'sync' step had new commits (simple test)
|
|
|
|
- name: Check for new commits
|
|
|
|
if: steps.sync.outputs.has_new_commits
|
|
|
|
run: echo "There were new commits."
|
|
|
|
|
|
|
|
# Step 4: Print a helpful timestamp for your records (not required, just nice)
|
|
|
|
- name: Timestamp
|
|
|
|
run: date
|