From 3f7c080411fc0bcfea02a4602677feca7ba4b809 Mon Sep 17 00:00:00 2001 From: Jessica Scheick Date: Wed, 27 Mar 2024 14:58:47 -0400 Subject: [PATCH 1/6] update template sync action --- .github/workflows/template-sync.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/template-sync.yaml b/.github/workflows/template-sync.yaml index 6a6f9b9..91335e1 100644 --- a/.github/workflows/template-sync.yaml +++ b/.github/workflows/template-sync.yaml @@ -1,5 +1,4 @@ name: 'Sync to Template' -description: 'Get updates to the Jupyterbook from the template repo' on: # cronjob trigger (minute, hour, day, month, day-of-week; here 1st of month) @@ -22,11 +21,14 @@ jobs: uses: actions/checkout@v4 # https://github.com/actions/checkout#usage # uncomment if you use submodules within the source repository - # with: + # comment token (and add .github path to .templatesyncignore) + # if you do not want actions and workflows updated + with: # submodules: true + token: ${{ secrets.GH_PAT }} - name: actions-template-sync - uses: AndreasAugustin/actions-template-sync@v1 + uses: AndreasAugustin/actions-template-sync@v2 with: github_token: ${{ secrets.GITHUB_TOKEN }} source_repo_path: uwhackweek/jupyterbook-template From 280154b019902ed93f6d9310fda4bf154e700a5e Mon Sep 17 00:00:00 2001 From: Jessica Scheick Date: Wed, 27 Mar 2024 15:04:08 -0400 Subject: [PATCH 2/6] update .templatesyncignore --- .templatesyncignore | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.templatesyncignore b/.templatesyncignore index b34136d..ddb9ac7 100644 --- a/.templatesyncignore +++ b/.templatesyncignore @@ -1,15 +1,17 @@ # THIS FILE CANNOT BE SYNCED # use glob patterns as in .gitignore # recommend listing non-basics tutorial directories here - +### # configuration files cookiecutter.yaml - +### # environment lock files -./conda/*lock.yml - +conda/*lock.yml +### +# team member files +team/*-* +### # book files (configuration, usage-specific) -./book/_config.yml -./book/team.yaml - +book/_config.yml +### # event-specific tutorials From b2b26d590b56b06be74e902520c4f71b4b69d5e3 Mon Sep 17 00:00:00 2001 From: Jessica Scheick Date: Wed, 27 Mar 2024 15:23:34 -0400 Subject: [PATCH 3/6] add note to readme about tokens --- .github/actions/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/README.md b/.github/actions/README.md index fc6d1fe..d8f4b09 100644 --- a/.github/actions/README.md +++ b/.github/actions/README.md @@ -43,6 +43,9 @@ Open a PR to update the templated repo to incorporate changes made to the [template repo](https://github.com/uwhackweek/jupyterbook-template). Template users should fill out the [.templatesyncignore](../../../.templatesyncignore) to specify which files they do not want updated from the template. +Note that if you want the GitHub action and workflow files to be updated, +you will need to [create a personal access token(PAT)](https://github.com/AndreasAugustin/actions-template-sync?tab=readme-ov-file#troubleshooting). +Alternatively, you must add ".github/**" to your `.templatesyncignore` file, and your actions will not be updated. ## Security From a71b9d98d427c3b5996fa8c710e8a94db70f3862 Mon Sep 17 00:00:00 2001 From: Jessica Scheick Date: Thu, 28 Mar 2024 13:48:53 -0400 Subject: [PATCH 4/6] remove submodules from checkout action --- .github/workflows/template-sync.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/template-sync.yaml b/.github/workflows/template-sync.yaml index 91335e1..385a458 100644 --- a/.github/workflows/template-sync.yaml +++ b/.github/workflows/template-sync.yaml @@ -19,12 +19,9 @@ jobs: # To use this repository's private action, you must check out the repository - name: Checkout uses: actions/checkout@v4 - # https://github.com/actions/checkout#usage - # uncomment if you use submodules within the source repository # comment token (and add .github path to .templatesyncignore) # if you do not want actions and workflows updated with: - # submodules: true token: ${{ secrets.GH_PAT }} - name: actions-template-sync From c29a55cf767d34d7ad41584874876ee0b915186f Mon Sep 17 00:00:00 2001 From: Jessica Scheick Date: Thu, 28 Mar 2024 15:33:25 -0400 Subject: [PATCH 5/6] underscore to dash --- team/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/team/README.md b/team/README.md index 4a42168..39cb9db 100644 --- a/team/README.md +++ b/team/README.md @@ -8,7 +8,7 @@ Follow these steps to add yourself: * Use the provided 'template.yaml' file and copy the file. * Create a copy of the 'template.yaml' file and rename the file to your name ``` - cp template.yaml FirstName_LastName.yaml + cp template.yaml FirstName-LastName.yaml ``` * Open the new file you just created in your favorite editor and fill out the details, replacing the placeholder text. From 59174ed1782f76bcc3abf9548c582eb31d8fae7e Mon Sep 17 00:00:00 2001 From: Jessica Scheick Date: Thu, 28 Mar 2024 15:44:33 -0400 Subject: [PATCH 6/6] add force deletion true to catch deleted files --- .github/workflows/template-sync.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/template-sync.yaml b/.github/workflows/template-sync.yaml index 385a458..96a424e 100644 --- a/.github/workflows/template-sync.yaml +++ b/.github/workflows/template-sync.yaml @@ -22,11 +22,12 @@ jobs: # comment token (and add .github path to .templatesyncignore) # if you do not want actions and workflows updated with: - token: ${{ secrets.GH_PAT }} + token: ${{ secrets.GITHUB_TOKEN }} - name: actions-template-sync uses: AndreasAugustin/actions-template-sync@v2 with: github_token: ${{ secrets.GITHUB_TOKEN }} source_repo_path: uwhackweek/jupyterbook-template - upstream_branch: main # defaults to main \ No newline at end of file + upstream_branch: main # defaults to main + is_force_deletion: True \ No newline at end of file