diff --git a/.github/workflows/docker_build_deploy.yaml b/.github/workflows/docker_build_deploy.yaml index 151fc4d5..8a33d8ce 100644 --- a/.github/workflows/docker_build_deploy.yaml +++ b/.github/workflows/docker_build_deploy.yaml @@ -8,6 +8,7 @@ on: paths-ignore: - '.github/workflows/**.yaml' - '.github/workbench-docker-version.txt' + - '.devcontainer' schedule: - cron: '0 0 * * 2' workflow_run: @@ -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: diff --git a/.github/workflows/update-cache.yaml b/.github/workflows/update-cache.yaml index b711f2d8..aafd761e 100644 --- a/.github/workflows/update-cache.yaml +++ b/.github/workflows/update-cache.yaml @@ -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 @@ -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 diff --git a/.github/workflows/update-workflows.yaml b/.github/workflows/update-workflows.yaml index 6d63a32c..632435de 100644 --- a/.github/workflows/update-workflows.yaml +++ b/.github/workflows/update-workflows.yaml @@ -18,6 +18,11 @@ 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: @@ -25,8 +30,9 @@ jobs: 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 @@ -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 diff --git a/.github/workflows/workflows-version.txt b/.github/workflows/workflows-version.txt index e946d6bb..3e7bcf08 100644 --- a/.github/workflows/workflows-version.txt +++ b/.github/workflows/workflows-version.txt @@ -1 +1 @@ -v1.0.3 +v1.0.4