-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup an automated PR to update downstream projects with changes (#57)
* Add a 'template sync' github workflow Signed-off-by: Fabrice Normandin <[email protected]> * Remove cruft-update workflow for now Signed-off-by: Fabrice Normandin <[email protected]> --------- Signed-off-by: Fabrice Normandin <[email protected]>
- Loading branch information
Showing
2 changed files
with
43 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,41 @@ | ||
# Action based on https://github.com/AndreasAugustin/actions-template-sync | ||
name: Update repository with changes from the template | ||
on: | ||
# cronjob trigger | ||
schedule: | ||
- cron: "0 0 1 * *" # on the first of every month | ||
# manual trigger | ||
workflow_dispatch: | ||
|
||
# https://0xdc.me/blog/github-templates-and-repository-sync/ | ||
env: | ||
SOURCE_BRANCH: master | ||
SOURCE_REPOSITORY: mila-iqia/ResearchTemplate | ||
|
||
jobs: | ||
repo-sync: | ||
runs-on: ubuntu-latest | ||
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
# To use this repository's private action, you must check out the repository | ||
- name: Checkout ${{ github.repository }} | ||
uses: actions/checkout@v4 | ||
if: github.repository != env.SOURCE_REPOSITORY | ||
# https://github.com/actions/checkout#usage | ||
# uncomment if you use submodules within the repository | ||
# with: | ||
# submodules: true | ||
|
||
- name: actions-template-sync | ||
uses: AndreasAugustin/actions-template-sync@v2 | ||
if: github.repository != env.SOURCE_REPOSITORY | ||
with: | ||
source_repo_path: mila-iqia/ResearchTemplate | ||
upstream_branch: master # defaults to main | ||
pr_labels: template_sync # defaults to template_sync | ||
pr_title: "Add new features from the template repository" | ||
pr_body: "This is an automated PR to update the repository with changes from the template." |
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