Skip to content

Commit c2feae4

Browse files
Merge pull request #12 from rhobs/test_wf
Test wf
2 parents 0636771 + 6af7eae commit c2feae4

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

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 synced-main origin/synced-main
31+
git merge upstream/main
32+
git push origin synced-main
33+
34+
- name: Clean up
35+
run: |
36+
git remote remove upstream

0 commit comments

Comments
 (0)