Skip to content

update to carpentry workflows from incubator example - #7

Merged
douglowe merged 1 commit into
mainfrom
build-failure-fix-2
Oct 29, 2026
Merged

douglowe merged 1 commit into
mainfrom
build-failure-fix-2

Conversation

@douglowe

@douglowe douglowe commented Oct 8, 2026

Copy link
Copy Markdown
Member

Switch to latest carpentry build workflows

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

ℹ️ Modified Workflows

This pull request contains modified workflow files and no preview will be created.

Workflow files modified:

  • .github/workflows/docker_apply_cache.yaml
  • .github/workflows/docker_build_deploy.yaml
  • .github/workflows/docker_pr_receive.yaml
  • .github/workflows/pr-close-signal.yaml
  • .github/workflows/pr-comment.yaml
  • .github/workflows/pr-post-remove-branch.yaml
  • .github/workflows/pr-preflight.yaml
  • .github/workflows/pr-receive.yaml
  • .github/workflows/sandpaper-main.yaml
  • .github/workflows/update-cache.yaml
  • .github/workflows/update-workflows.yaml

If this is not from a trusted source, please inspect the changes for any malicious content.

Comment on lines +33 to +50
name: "Preflight: PR or Manual Trigger?"
runs-on: ubuntu-latest
outputs:
do-apply: ${{ steps.check.outputs.merged_or_manual }}
steps:
- name: "Should we run cache application?"
id: check
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ||
("${{ github.ref }}" == "refs/heads/main" && "${{ github.event.action }}" == "closed" && "${{ github.event.pull_request.merged }}" == "true") ]]; then
echo "merged_or_manual=true" >> $GITHUB_OUTPUT
else
echo "This was not a manual trigger and no PR was merged. No action taken."
echo "merged_or_manual=false" >> $GITHUB_OUTPUT
fi
shell: bash

check-renv:
Comment on lines +51 to +66
name: "Check If We Need {renv}"
runs-on: ubuntu-latest
needs: preflight
if: needs.preflight.outputs.do-apply == 'true'
outputs:
renv-needed: ${{ steps.check-for-renv.outputs.renv-needed }}
renv-cache-hashsum: ${{ steps.check-for-renv.outputs.renv-cache-hashsum }}
steps:
- name: "Check for renv"
id: check-for-renv
uses: carpentries/actions/renv-checks@v1
with:
WORKBENCH_TAG: ${{ vars.WORKBENCH_TAG || 'latest' }}
skip-cache-check: true

no-renv-cache-used:
Comment on lines +67 to +75
name: "No renv package dependency image needed"
runs-on: ubuntu-latest
needs: check-renv
if: needs.check-renv.outputs.renv-needed != 'true'
steps:
- name: "No dependency image needed"
run: echo "No renv dependency image needed for this lesson"

update-renv-cache:
Comment on lines +154 to +170
name: "Prune Dependency Images"
runs-on: ubuntu-latest
needs: check-renv
steps:
- name: Prune any old dependency image layers
uses: carpentries/actions/prune-dependency-images@v1
if: needs.check-renv.outputs.renv-needed == 'true'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
owner: ${{ github.repository_owner }}
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 }}
continue-on-error: true

record-cache-result:
Comment on lines +171 to +187
name: "Record Caching Status"
runs-on: ubuntu-latest
needs: [check-renv, update-renv-cache]
if: always()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: "Record cache result"
run: |
echo "${{ needs.check-renv.outputs.renv-needed != 'true' || needs.update-renv-cache.result == 'success' }}" > ${{ github.workspace }}/apply-cache-result
shell: bash

- name: "Upload cache result"
uses: actions/upload-artifact@v7
with:
name: apply-cache-result
path: ${{ github.workspace }}/apply-cache-result
Comment on lines +45 to +76
name: "Preflight: Schedule, Push, or PR?"
runs-on: ubuntu-latest
outputs:
do-build: ${{ steps.build-check.outputs.do-build }}
renv-needed: ${{ steps.build-check.outputs.renv-needed }}
renv-cache-hashsum: ${{ steps.build-check.outputs.renv-cache-hashsum }}
dependency-image-ref: ${{ steps.build-check.outputs.dependency-image-ref }}
workbench-container-file-exists: ${{ steps.wb-vers.outputs.workbench-container-file-exists }}
wb-vers: ${{ steps.wb-vers.outputs.container-version }}
last-wb-vers: ${{ steps.wb-vers.outputs.last-container-version }}
workbench-update: ${{ steps.wb-vers.outputs.workbench-update }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: "Should we run build and deploy?"
id: build-check
uses: carpentries/actions/build-preflight@v1

- name: "Checkout Lesson"
if: steps.build-check.outputs.do-build == 'true'
uses: actions/checkout@v6

- name: "Get container version info"
id: wb-vers
if: steps.build-check.outputs.do-build == 'true'
uses: carpentries/actions/container-version@v1
with:
WORKBENCH_TAG: ${{ vars.WORKBENCH_TAG }}
renv-needed: ${{ steps.build-check.outputs.renv-needed }}
token: ${{ secrets.GITHUB_TOKEN }}

full-build:
Comment on lines 35 to +57
@@ -33,50 +52,44 @@ jobs:
echo "ok=false" >> $GITHUB_OUTPUT
echo "Not Running Today"
fi
shell: bash

check_renv:
name: "Check if We Need {renv}"
runs-on: ubuntu-22.04
check-renv:
name: "Check If We Need {renv}"
runs-on: ubuntu-latest
needs: preflight
if: ${{ needs.preflight.outputs.ok == 'true'}}
if: ${{ needs.preflight.outputs.ok == 'true' }}
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Changes were made to copyright notices

There are copyright updates on the (temporary) add-license-headers-to-build-failure-fix-2-2026-10-08-15-22-24 branch. Please review and merge, or add further commits (this branch will be deleted).

@douglowe
douglowe merged commit 71449a7 into main Oct 29, 2026
@douglowe
douglowe deleted the build-failure-fix-2 branch October 29, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants