Skip to content

Commit 9bdcbae

Browse files
Merge pull request #8 from rhobs/test_wf
update
2 parents 9aada65 + 6b61d2f commit 9bdcbae

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Sync Fork
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' #every 24h
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
sync:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout your forked repository
16+
uses: actions/checkout@v4
17+
with:
18+
repository: rhobs/api
19+
token: ${{ secrets.GITHUB_TOKEN }}
20+
fetch-depth: 0
21+
22+
- name: Add upstream repository
23+
run: |
24+
git remote add upstream https://github.com/observatorium/api
25+
git fetch upstream
26+
27+
- name: Sync with upstream/main
28+
run: |
29+
git fetch upstream main
30+
git checkout -B main origin/main
31+
git merge upstream/main
32+
git push origin main
33+
34+
- name: Clean up
35+
run: |
36+
git remote remove upstream

0 commit comments

Comments
 (0)