Skip to content

Commit 9dd5528

Browse files
ci: create sync-forks workflow
1 parent 34b8de9 commit 9dd5528

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/sync-forks.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Sync Forks
2+
# adapted from CCBR/.github: https://github.com/CCBR/.github/blob/b51390632d8093aa2a3c8cbb871a2f2b5c7d5aae/.github/workflows/sync-forks.yml
3+
4+
on:
5+
schedule:
6+
- cron: "23 10 * * *" # once every day
7+
push:
8+
paths:
9+
- .github/workflows/sync-forks.yml
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: write
14+
15+
env:
16+
# Token must be created by someone with write access for all forks.
17+
# Be sure to 'configure SSO' from the token creation page for each fork organization.
18+
GH_TOKEN: ${{ secrets.SYNC_FORK_TOKEN }}
19+
UPSTREAM_OWNER: NCI-RBL
20+
21+
jobs:
22+
sync:
23+
runs-on: ubuntu-latest
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
FORK_OWNER: [ abcsFrederick ]
28+
REPO: [ {upstream: iCLIP_V3, fork: iCLIP_V3},
29+
{upstream: Dockers, fork: NCI-RBL-Dockers},
30+
{upstream: RNA-seek, fork: RNA-seek}
31+
]
32+
33+
steps:
34+
- name: sync forked repos
35+
run: |
36+
gh repo sync ${{ matrix.FORK_OWNER }}/${{ matrix.REPO.fork }} --source $UPSTREAM_OWNER/${{ matrix.REPO.upstream }} --force

0 commit comments

Comments
 (0)