Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,17 @@ Repository-level variables for this workflow are:
- Force a reset of previously build markdown files
- Setting this variable value to `true` will force sandpaper to delete any previously build markdown files
- Default is unset or `false`
- OMIT_PR_CONTAINER_VERSION_UPDATE
- Control raise behaviour of the workbench-docker version update PR
- When a new workbench Docker image version is detected, usually after a sandpaper, varnish, or pegboard update, its version number will be incremented
- If a newer version is available, a PR will be raised that updates the `.github/workbench-docker-version.txt` file
- To not raise this PR set this to `true`
- Default is unset or `false`
- AUTO_MERGE_WORKBENCH_VERSION_UPDATE
- Control merge behaviour of the workbench-docker version update PR
- When a new workbench Docker image version is detected, usually after a sandpaper, varnish, or pegboard update, its version number will be incremented
- If a newer version is available, a PR will be auto-generated that updates the `.github/workbench-docker-version.txt` file, and this PR will be auto-merged
- To not auto-merge this PR and to choose when to update the Docker version used, set this to `false`.
- Default is unset or `true`
- If OMIT_PR_CONTAINER_VERSION_UPDATE is `true` this option does nothing
- To auto-merge this PR, set this to `true`
- Default is unset or `false`
- LANG_CODE
- Two-letter language code that triggers the use of Joel Nitta's {dovetail} package for lesson translation
- This is used in the internationalisation repos of the main Carpentry lesson programs
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docker_apply_cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ jobs:
name: "Prune Dependency Images"
runs-on: ubuntu-latest
needs: check-renv
permissions:
contents: read
packages: write
steps:
- name: Prune any old dependency image layers
uses: carpentries/actions/prune-dependency-images@v1
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/docker_build_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
paths-ignore:
- '.github/workflows/**.yaml'
- '.github/workbench-docker-version.txt'
- '.devcontainer'
schedule:
- cron: '0 0 * * 2'
workflow_run:
Expand Down Expand Up @@ -37,7 +38,7 @@ on:

# only one build/deploy at a time
concurrency:
group: docker-build-deploy
group: docker-build-deploy-${{ github.event_name }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -95,6 +96,7 @@ jobs:
RENV_PATHS_ROOT: /home/rstudio/lesson/renv
RENV_PROFILE: "lesson-requirements"
RENV_CONFIG_EXTERNAL_LIBRARIES: "/usr/local/lib/R/site-library"
WORKBENCH_OVERLAY_CUSTOMIZATION: ${{ vars.WORKBENCH_OVERLAY_CUSTOMIZATION || '' }}
volumes:
- ${{ github.workspace }}:/home/rstudio/lesson
options: --cpus 1
Expand Down Expand Up @@ -144,7 +146,8 @@ jobs:
uses: carpentries/actions/record-container-version@v1
with:
CONTAINER_VER: ${{ needs.preflight.outputs.wb-vers }}
AUTO_MERGE: ${{ vars.AUTO_MERGE_CONTAINER_VERSION_UPDATE || 'true' }}
OMIT_PR: ${{ vars.OMIT_PR_CONTAINER_VERSION_UPDATE || 'false' }}
AUTO_MERGE: ${{ vars.AUTO_MERGE_CONTAINER_VERSION_UPDATE || 'false' }}
token: ${{ secrets.GITHUB_TOKEN }}
role-to-assume: ${{ secrets.AWS_GH_OIDC_ARN }}
aws-region: ${{ secrets.AWS_GH_OIDC_REGION }}
4 changes: 2 additions & 2 deletions .github/workflows/update-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:

update_cache:
name: "Create Package Update Pull Request"
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs: check-renv
permissions:
contents: write
Expand All @@ -95,7 +95,7 @@ jobs:
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
install-r: false
install-r: true

- name: "Update {renv} deps and determine if a PR is needed"
id: update
Expand Down
40 changes: 39 additions & 1 deletion .github/workflows/update-workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,21 @@ on:
description: 'Workflow files/file extensions to clean (no wildcards, enter "" for none)'
required: false
default: '.yaml'
clean-devc:
description: 'Clean devcontainer files'
required: false
default: true
type: boolean

jobs:
update_workflow:
name: "Update Workflow"
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
packages: read
pull-requests: write
steps:
- name: "Checkout Repository"
uses: actions/checkout@v6
Expand Down Expand Up @@ -115,3 +121,35 @@ jobs:
[1]: https://github.com/carpentries/create-pull-request/tree/main
labels: "type: workflows"
draft: false

- name: Update devcontainer
id: update-devcontainer
if: ${{ steps.validate-token.outputs.wf == 'true' }}
uses: carpentries/actions/update-devcontainer@v1
with:
token: ${{ steps.set-pat.outputs.pat || secrets.SANDPAPER_WORKFLOW }}
repo: ${{ github.repository }}
clean: ${{ github.event.inputs.clean-devc || 'true' }}

- name: Create Devcontainer Pull Request
id: cdpr
if: |
steps.update-devcontainer.outputs.repo-package-ref &&
steps.validate-token.outputs.wf == 'true'
uses: carpentries/create-pull-request@main
with:
token: ${{ steps.set-pat.outputs.pat || secrets.SANDPAPER_WORKFLOW }}
delete-branch: true
branch: "update/devcontainer"
commit-message: "[actions] update devcontainer to version ${{ steps.update-devcontainer.outputs.repo-package-ref }}"
title: "Update Devcontainer to Version ${{ steps.update-devcontainer.outputs.repo-package-ref }}"
body: |
:robot: This is an automated build
Set devcontainer spec to: ${{ steps.update-devcontainer.outputs.repo-package-ref }}
- Auto-generated by [create-pull-request][1] on ${{ steps.update-devcontainer.outputs.date }}
[1]: https://github.com/carpentries/create-pull-request/tree/main
labels: "type: workflows"
draft: false
2 changes: 1 addition & 1 deletion .github/workflows/workflows-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.0.2
v1.0.4
Loading