Skip to content

Commit f086b20

Browse files
authored
Add workflow to sync fork with upstream master branch (#2)
1 parent b05d7d5 commit f086b20

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Manage - Sync fork (Branch master)
3+
4+
"on":
5+
workflow_dispatch:
6+
schedule:
7+
- cron: '0 0 * * *'
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
update_external_airflow_fork:
14+
name: Sync branch master with origin
15+
runs-on: ubuntu-latest
16+
17+
permissions:
18+
contents: read
19+
20+
steps:
21+
- name: Generate app token
22+
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
23+
id: generate-token
24+
with:
25+
app-id: ${{ secrets.GH_APP_SRP_ID }}
26+
private-key: ${{ secrets.GH_APP_SRP_PRIVATE_KEY }}
27+
28+
- name: Checkout Code
29+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
30+
with:
31+
fetch-depth: 0
32+
33+
- name: Synchronize the given branch now
34+
uses: TobKed/github-forks-sync-action@2fb78daa46a630ff56455a63dec51ff00ba56e23 # v0.4.0
35+
with:
36+
github_token: ${{ steps.generate-token.outputs.token }}
37+
upstream_repository: Cyclenerd/hcloud-github-runner
38+
target_repository: ${{ github.repository }}
39+
upstream_branch: master
40+
target_branch: master
41+
force: false
42+
tags: false

0 commit comments

Comments
 (0)