File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,23 +2,29 @@ name: Repo Sync
22
33on :
44 schedule :
5- - cron : " */15 * * * *" # every 15 minutes
5+ - cron : " 0 8 * * 1-5" # At 08:00 on every day-of-week from Monday through Friday
6+ workflow_dispatch :
67
78jobs :
89 repo-sync :
910 name : Repo Sync
1011 runs-on : ubuntu-latest
12+ env :
13+ IS_CONFIGURED : ${{ secrets.SOURCE_REPO != '' }}
1114 steps :
1215 - uses : actions/checkout@v3
16+ if : ${{ env.IS_CONFIGURED == 'true' }}
1317 - uses : repo-sync/github-sync@v2
1418 name : Sync repo to branch
19+ if : ${{ env.IS_CONFIGURED == 'true' }}
1520 with :
1621 source_repo : ${{ secrets.SOURCE_REPO }}
1722 source_branch : main
1823 destination_branch : ${{ secrets.INTERMEDIATE_BRANCH }}
1924 github_token : ${{ secrets.GITHUB_TOKEN }}
2025 - uses : repo-sync/pull-request@v2
2126 name : Create pull request
27+ if : ${{ env.IS_CONFIGURED == 'true' }}
2228 with :
2329 source_branch : ${{ secrets.INTERMEDIATE_BRANCH }}
2430 destination_branch : main
You can’t perform that action at this time.
0 commit comments