Skip to content

Commit d0b6f6f

Browse files
authored
Create sync-2-upstream.yml
1 parent eaca1ab commit d0b6f6f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/sync-2-upstream.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Sync to Upstream
2+
3+
on:
4+
schedule:
5+
- cron: '0 7 * * 1,4'
6+
# scheduled at 07:00 every Monday and Thursday
7+
workflow_dispatch:
8+
9+
jobs:
10+
sync_with_upstream:
11+
runs-on: ubuntu-latest
12+
name: Sync HEAD with upstream latest
13+
14+
steps:
15+
# Step 1: run a standard checkout action, provided by github
16+
- name: Checkout HEAD
17+
uses: actions/checkout@v2
18+
with:
19+
ref: master
20+
21+
# Step 2: run this sync action - specify the upstream repo, upstream branch to sync with, and target sync branch
22+
- name: Pull upstream changes
23+
id: sync
24+
uses: aormsby/[email protected]
25+
with:
26+
upstream_repository: smart-data-models/dataModel.WaterConsumption
27+
upstream_branch: master
28+
target_branch: master # optional
29+
github_token: ${{ secrets.GITHUB_TOKEN }} # optional, for accessing repos that require authentication

0 commit comments

Comments
 (0)