Update Workflows to Version v1.0.2 - #541
Conversation
|
There was a problem hiding this comment.
🟡 Changes recommended
The new dependency-image pruning flow has configuration issues (missing defaulting for keep-count, likely insufficient token permissions, and a preflight gate that may prevent runs on merged PRs) that can break or silently disable intended maintenance behavior.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the repository’s Carpentries Workbench GitHub Actions workflows to align with sandpaper workflows v1.0.2, primarily by switching workflow action references from @main to stable @v1 and updating the dependency-caching approach from “package caches” toward GHCR-published dependency images.
Changes:
- Bump Carpentries workflow action usages across workflows from
@mainto@v1, and update the tracked workflows version tov1.0.2. - Update build workflows to consume a computed
dependency-image-refinstead of always usingghcr.io/carpentries/workbench-docker. - Revise workflow documentation to reflect the “dependency image” approach and improve clarity/examples.
File summaries
| File | Description |
|---|---|
| .github/workflows/workflows-version.txt | Updates recorded workflows version to v1.0.2. |
| .github/workflows/update-workflows.yaml | Pins validation/update actions to @v1 and passes token into the update action. |
| .github/workflows/update-cache.yaml | Pins renv-related actions to @v1 and clarifies the cron schedule comment. |
| .github/workflows/README.md | Expands/updates docs for Workbench workflows and dependency images; fixes typos. |
| .github/workflows/pr-preflight.yaml | Pins PR validation/comment actions to @v1. |
| .github/workflows/pr-post-remove-branch.yaml | Pins artifact download and branch removal actions to @v1. |
| .github/workflows/pr-comment.yaml | Pins artifact download, PR validation, and comment actions to @v1. |
| .github/workflows/docker_pr_receive.yaml | Switches renv checks to @v1 and uses dependency-image-ref for container image. |
| .github/workflows/docker_build_deploy.yaml | Uses dependency-image-ref, pins Carpentries actions to @v1, and updates “skip manage deps” logic. |
| .github/workflows/docker_apply_cache.yaml | Reworks cache publication into GHCR dependency image build/push + optional pruning; pins actions to @v1. |
Review details
- Files reviewed: 10/10 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| @@ -42,171 +52,120 @@ jobs: | |||
| runs-on: ubuntu-latest | |||
| needs: preflight | |||
| if: needs.preflight.outputs.do-apply == 'true' | |||
There was a problem hiding this comment.
I'm almost certain this is incorrect. PRs merged and closed against main have the correct ref, e.g. https://github.com/froggleston/R-ecology-lesson/actions/runs/28957593021/job/85920558306?pr=30#step:2:2
| prune-dependency-images: | ||
| name: "Prune Dependency Images" | ||
| runs-on: ubuntu-latest | ||
| needs: check-renv | ||
| steps: |
There was a problem hiding this comment.
I'm pretty sure I tested this and the caches are deleted, but I'll do some more testing!
| owner-type: ${{ github.event.repository.owner.type }} | ||
| repository: ${{ github.event.repository.name }} | ||
| package-name: ${{ github.event.repository.name }}-deps | ||
| keep-count: ${{ github.event.inputs.prune-keep-count }} |
There was a problem hiding this comment.
The underlying composite action defaults keep-count to "1", so this is a no-op.
douglowe
left a comment
There was a problem hiding this comment.
I'm going to merge this, as it is following the carpentries standard. There's some suggestions from GH copilot, which we should look at in depth if the build fails.
🤖 This is an automated build
Update Workflows from sandpaper version 1.0.1 -> v1.0.2