Skip to content

Commit 14cea55

Browse files
authored
added auto official changes merging
added a workflow action that updates the repo automatically with changes of the main repo
1 parent f4c7aef commit 14cea55

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

mergeUpstreamCommits.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
on:
2+
schedule:
3+
- cron: '0 7 * * *'
4+
# scheduled at 07:00 every Monday and Thursday
5+
6+
workflow_dispatch: # click the button on Github repo!
7+
8+
9+
jobs:
10+
sync_with_upstream:
11+
runs-on: ubuntu-latest
12+
name: Sync main with upstream latest
13+
14+
steps:
15+
# Step 1: run a standard checkout action, provided by github
16+
- name: Checkout main
17+
uses: actions/checkout@v2
18+
with:
19+
ref: main
20+
# submodules: 'recursive' ### may be needed in your situation
21+
22+
# Step 2: run this sync action - specify the upstream repo, upstream branch to sync with, and target sync branch
23+
- name: Pull (Fast-Forward) upstream changes
24+
id: sync
25+
uses: aormsby/Fork-Sync-With-Upstream-action@v2.1
26+
with:
27+
upstream_repository: aormsby/hugo-deploy-to-pages
28+
upstream_branch: main
29+
target_branch: main
30+
git_pull_args: --ff-only # optional arg use, defaults to simple 'pull'
31+
32+
# Step 3: Display a message if 'sync' step had new commits (simple test)
33+
- name: Check for new commits
34+
if: steps.sync.outputs.has_new_commits
35+
run: echo "There were new commits."
36+
37+
# Step 4: Print a helpful timestamp for your records (not required, just nice)
38+
- name: Timestamp
39+
run: date

0 commit comments

Comments
 (0)