-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: create action to sync all public CCBR forks
resolves CCBR/kelly_log#16
- Loading branch information
1 parent
b0f5417
commit 72d3948
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Sync Forks | ||
|
||
on: | ||
schedule: | ||
- cron: "47 11 * * *" # once every day | ||
workflow_dispatch: # on button click | ||
push: | ||
paths: | ||
- .github/workflows/sync-forks.yml | ||
|
||
permissions: | ||
contents: write | ||
|
||
env: | ||
# token must be created by someone with write access for all forks | ||
GH_TOKEN: ${{ secrets.SYNC_FORK_TOKEN }} | ||
UPSTREAM_OWNER: CCBR | ||
|
||
jobs: | ||
sync: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
FORK_OWNER: [NCIPangea] | ||
REPO: [XAVIER, RENEE] | ||
steps: | ||
- name: sync forked repos | ||
run: | | ||
gh repo sync ${{ matrix.FORK_OWNER }}/${{ matrix.REPO }} --source $UPSTREAM_OWNER/${{ matrix.REPO }} --force |