diff --git a/.github/workflows/__greetings.yml b/.github/workflows/__greetings.yml index 0154675d..00cc97f0 100644 --- a/.github/workflows/__greetings.yml +++ b/.github/workflows/__greetings.yml @@ -10,7 +10,7 @@ permissions: {} jobs: greetings: - uses: hoverkraft-tech/ci-github-common/.github/workflows/greetings.yml@4b53189212d5810f710bed89711002626977215b # 0.33.0 + uses: hoverkraft-tech/ci-github-common/.github/workflows/greetings.yml@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 permissions: contents: read issues: write diff --git a/.github/workflows/__need-fix-to-issue.yml b/.github/workflows/__need-fix-to-issue.yml index d7531588..3b2c9c80 100644 --- a/.github/workflows/__need-fix-to-issue.yml +++ b/.github/workflows/__need-fix-to-issue.yml @@ -21,7 +21,7 @@ permissions: {} jobs: main: - uses: hoverkraft-tech/ci-github-common/.github/workflows/need-fix-to-issue.yml@4b53189212d5810f710bed89711002626977215b # 0.33.0 + uses: hoverkraft-tech/ci-github-common/.github/workflows/need-fix-to-issue.yml@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 permissions: contents: read issues: write diff --git a/.github/workflows/__semantic-pull-request.yml b/.github/workflows/__semantic-pull-request.yml index f0a26cbb..95ae69cd 100644 --- a/.github/workflows/__semantic-pull-request.yml +++ b/.github/workflows/__semantic-pull-request.yml @@ -12,7 +12,7 @@ permissions: {} jobs: main: - uses: hoverkraft-tech/ci-github-common/.github/workflows/semantic-pull-request.yml@4b53189212d5810f710bed89711002626977215b # 0.33.0 + uses: hoverkraft-tech/ci-github-common/.github/workflows/semantic-pull-request.yml@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 permissions: contents: write pull-requests: write diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 61b27abf..311f6ebc 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -16,7 +16,7 @@ permissions: jobs: linter: - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@4b53189212d5810f710bed89711002626977215b # 0.33.0 + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 test-action-docker-build-image: needs: linter diff --git a/.github/workflows/__stale.yml b/.github/workflows/__stale.yml index 339921e9..3d990c29 100644 --- a/.github/workflows/__stale.yml +++ b/.github/workflows/__stale.yml @@ -9,7 +9,7 @@ permissions: {} jobs: main: - uses: hoverkraft-tech/ci-github-common/.github/workflows/stale.yml@4b53189212d5810f710bed89711002626977215b # 0.33.0 + uses: hoverkraft-tech/ci-github-common/.github/workflows/stale.yml@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 permissions: issues: write pull-requests: write diff --git a/.github/workflows/docker-build-images.yml b/.github/workflows/docker-build-images.yml index 557877d6..695a7c0b 100644 --- a/.github/workflows/docker-build-images.yml +++ b/.github/workflows/docker-build-images.yml @@ -372,7 +372,7 @@ jobs: packages: write id-token: write # Needed for getting local workflow actions steps: - - uses: hoverkraft-tech/ci-github-common/actions/checkout@4b53189212d5810f710bed89711002626977215b # 0.33.0 + - uses: hoverkraft-tech/ci-github-common/actions/checkout@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 with: lfs: ${{ inputs.lfs }} @@ -381,7 +381,7 @@ jobs: run: git lfs pull - id: local-workflow-actions - uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@4b53189212d5810f710bed89711002626977215b # 0.33.0 + uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 with: actions-path: actions @@ -452,12 +452,12 @@ jobs: # FIXME: Set built images infos in file to be uploaded as artifacts, because github action does not handle job outputs for matrix # https://github.com/orgs/community/discussions/26639 - - uses: hoverkraft-tech/ci-github-common/actions/set-matrix-output@4b53189212d5810f710bed89711002626977215b # 0.33.0 + - uses: hoverkraft-tech/ci-github-common/actions/set-matrix-output@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 with: artifact-name: ${{ needs.prepare-variables.outputs.artifact-name }} value: ${{ steps.build.outputs.built-image }} - - uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@4b53189212d5810f710bed89711002626977215b # 0.33.0 + - uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 if: always() && steps.local-workflow-actions.outputs.repository with: actions-path: actions @@ -476,7 +476,7 @@ jobs: built-images: ${{ steps.create-images-manifests.outputs.built-images }} steps: - id: get-matrix-outputs - uses: hoverkraft-tech/ci-github-common/actions/get-matrix-outputs@4b53189212d5810f710bed89711002626977215b # 0.33.0 + uses: hoverkraft-tech/ci-github-common/actions/get-matrix-outputs@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 with: artifact-name: ${{ needs.prepare-variables.outputs.artifact-name }} @@ -514,7 +514,7 @@ jobs: core.setOutput('built-images', JSON.stringify(images)); - id: local-workflow-actions - uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@4b53189212d5810f710bed89711002626977215b # 0.33.0 + uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 with: actions-path: actions @@ -551,7 +551,7 @@ jobs: images: ${{ steps.get-images-to-sign.outputs.images-to-sign }} github-token: ${{ secrets.GITHUB_TOKEN }} - - uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@4b53189212d5810f710bed89711002626977215b # 0.33.0 + - uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 if: always() && steps.local-workflow-actions.outputs.repository with: actions-path: actions diff --git a/.github/workflows/prune-pull-requests-images-tags.yml b/.github/workflows/prune-pull-requests-images-tags.yml index 2e4e4923..3cb8423d 100644 --- a/.github/workflows/prune-pull-requests-images-tags.yml +++ b/.github/workflows/prune-pull-requests-images-tags.yml @@ -107,7 +107,7 @@ jobs: id-token: write # Needed for getting local workflow actions steps: - id: local-workflow-actions - uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@4b53189212d5810f710bed89711002626977215b # 0.33.0 + uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 with: actions-path: actions @@ -118,7 +118,7 @@ jobs: pull-request-tag-filter: ${{ inputs.pull-request-tag-filter }} preserve-tags-filter: ${{ inputs.preserve-tags-filter }} - - uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@4b53189212d5810f710bed89711002626977215b # 0.33.0 + - uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 if: always() && steps.local-workflow-actions.outputs.repository with: actions-path: actions diff --git a/README.md b/README.md index eee61dd7..8b40c1d1 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,8 @@ _Actions that operate on OCI images across their build, metadata, and lifecycle #### - [Build image](actions/docker/build-image/README.md) +#### - [Cleanup builder](actions/docker/cleanup-builder/README.md) + #### - [Clean images](actions/docker/clean-images/README.md) #### - [Create images manifests](actions/docker/create-images-manifests/README.md) diff --git a/actions/docker/build-image/action.yml b/actions/docker/build-image/action.yml index 77aaa6bb..c6304daa 100644 --- a/actions/docker/build-image/action.yml +++ b/actions/docker/build-image/action.yml @@ -149,36 +149,40 @@ outputs: runs: using: "composite" steps: - - shell: bash - # FIXME: workaround until will be merged: https://github.com/actions/runner/pull/1684 - run: mkdir -p ./self-actions/ && cp -r $GITHUB_ACTION_PATH/../../* ./self-actions/ + - uses: hoverkraft-tech/ci-github-common/actions/local-actions@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 + with: + source-path: ${{ github.action_path }}/../.. - id: slugify-platform - uses: hoverkraft-tech/ci-github-common/actions/slugify@4b53189212d5810f710bed89711002626977215b # 0.33.0 + uses: hoverkraft-tech/ci-github-common/actions/slugify@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 with: value: ${{ inputs.platform }} - id: docker-setup - uses: ./self-actions/docker/setup + uses: ./../self-actions/docker/setup with: oci-registry: ${{ inputs.oci-registry }} oci-registry-username: ${{ inputs.oci-registry-username }} oci-registry-password: ${{ inputs.oci-registry-password }} buildkitd-config-inline: ${{ inputs.buildkitd-config-inline }} + buildx-cleanup: false + + - name: Register Buildx cleanup + # FIXME: Workaround for GitHub Actions post-step ordering behavior with composite actions. + # The built-in Buildx cleanup can run before later post steps that still need the builder. + # See: https://github.com/actions/runner/issues/1657 + uses: ./../self-actions/docker/cleanup-builder + with: + builder: ${{ steps.docker-setup.outputs.buildx-name }} - id: metadata - uses: ./self-actions/docker/get-image-metadata + uses: ./../self-actions/docker/get-image-metadata with: oci-registry: ${{ steps.docker-setup.outputs.push-registry }} repository: ${{ inputs.repository }} image: ${{ inputs.image }} tag: ${{ inputs.tag }} - - shell: bash - # FIXME: workaround until will be merged: https://github.com/actions/runner/pull/1684 - run: | - rm -fr ./self-actions - - id: get-docker-config uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: @@ -190,8 +194,10 @@ runs: MULTI_PLATFORM_INPUT: ${{ inputs.multi-platform }} PLATFORM_INPUT: ${{ inputs.platform }} SLUGIFIED_PLATFORM: ${{ steps.slugify-platform.outputs.result }} + TARGET_INPUT: ${{ inputs.target }} with: script: | + const { createHash } = require('crypto'); const fs = require('fs'); const path = require('path'); @@ -210,6 +216,16 @@ runs: const resolvedDockerfilePath = fs.realpathSync(dockerfilePath); core.setOutput('dockerfile-path', resolvedDockerfilePath); + const cacheMountScope = JSON.stringify({ + image: process.env.METADATA_IMAGE || '', + platform: process.env.PLATFORM_INPUT || '', + target: process.env.TARGET_INPUT || '', + }); + const cacheMountScopeHash = createHash('sha256') + .update(cacheMountScope) + .digest('hex'); + core.setOutput('cache-mount-scope', cacheMountScopeHash); + const slugifiedPlatform = process.env.SLUGIFIED_PLATFORM || ''; const tagSuffix = `-${slugifiedPlatform}`; core.setOutput('cache-flavor', `suffix=${tagSuffix}`); @@ -299,7 +315,9 @@ runs: id: cache with: path: cache-mount - key: cache-mount-${{ hashFiles(steps.get-docker-config.outputs.dockerfile-path) }} + key: cache-mount-${{ hashFiles(steps.get-docker-config.outputs.dockerfile-path) }}-${{ steps.get-docker-config.outputs.cache-mount-scope }} + restore-keys: | + cache-mount-${{ hashFiles(steps.get-docker-config.outputs.dockerfile-path) }}- - name: Restore Docker cache mounts uses: reproducible-containers/buildkit-cache-dance@1b8ab18fbda5ad3646e3fcc9ed9dd41ce2f297b4 # v3.3.2 diff --git a/actions/docker/cleanup-builder/README.md b/actions/docker/cleanup-builder/README.md new file mode 100644 index 00000000..02d70ce4 --- /dev/null +++ b/actions/docker/cleanup-builder/README.md @@ -0,0 +1,70 @@ + + +# ![Icon](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItdHJhc2gtMiIgY29sb3I9ImJsdWUiPjxwb2x5bGluZSBwb2ludHM9IjMgNiA1IDIwIDIxIDIwIDIxIDYiPjwvcG9seWxpbmU+PHBhdGggZD0iTTE5IDZWNGExIDEgMCAwIDAtMS0xaC00YTEgMSAwIDAgMC0xIDF2Mk01IDZoMTQiPjwvcGF0aD48cGF0aCBkPSJNMTAgMTF2NiI+PC9wYXRoPjxwYXRoIGQ9Ik0xNCAxMXY2Ij48L3BhdGg+PC9zdmc+) GitHub Action: Docker - Cleanup builder + +
+ Docker - Cleanup builder +
+ +--- + + + + +## Overview + +Registers a post-job step that removes a Docker Buildx builder after later post-job hooks have finished. +This action exists as a workaround for GitHub Actions post-step ordering behavior with composite actions, where the effective cleanup order may not match the visible reverse order of YAML steps. + + + + +## Usage + +```yaml +- uses: hoverkraft-tech/ci-github-container/actions/docker/cleanup-builder@main + with: + builder: ${{ steps.docker-setup.outputs.buildx-name }} + enabled: true +``` + + + + +## Inputs + +| **Input** | **Description** | **Required** | **Default** | +| ------------- | ------------------------------------------------------------- | ------------ | ----------- | +| **`builder`** | Docker Buildx builder name to remove during post-job cleanup. | **false** | - | +| **`enabled`** | Whether cleanup should run during the post-job phase. | **false** | `true` | + + + +## Notes + +Use this action before other actions whose post-job hooks still need the builder. It is intended as a workaround for GitHub Actions runner behavior around post-step ordering in composite actions. See [actions/runner#1657](https://github.com/actions/runner/issues/1657). + +In practice, this means the built-in `docker/setup-buildx-action` cleanup can run too early for actions such as `docker/build-push-action` or `reproducible-containers/buildkit-cache-dance` that still access the builder during their own post-job hooks. + +This action works by registering its cleanup post hook earlier, so the runner executes it later than the post hooks that still need the builder. + + + +## Contributing + +Contributions are welcome! Please see the [contributing guidelines](https://github.com/hoverkraft-tech/ci-github-container/blob/main/CONTRIBUTING.md) for more details. + + + + +## License + +This project is licensed under the MIT License. + +SPDX-License-Identifier: MIT + +Copyright © 2026 hoverkraft + +For more details, see the [license](http://choosealicense.com/licenses/mit/). + + diff --git a/actions/docker/cleanup-builder/action.yml b/actions/docker/cleanup-builder/action.yml new file mode 100644 index 00000000..2e283068 --- /dev/null +++ b/actions/docker/cleanup-builder/action.yml @@ -0,0 +1,22 @@ +name: "Docker - Cleanup builder" +description: | + Register a post-job step that removes a Docker Buildx builder after later post steps have finished. +author: hoverkraft +branding: + icon: trash-2 + color: blue + +inputs: + builder: + description: "Docker Buildx builder name to remove during post-job cleanup." + required: false + enabled: + description: "Whether cleanup should run during the post-job phase." + default: true + required: false + +runs: + using: "node24" + main: "index.js" + post: "post.js" + post-if: "always()" diff --git a/actions/docker/cleanup-builder/index.js b/actions/docker/cleanup-builder/index.js new file mode 100644 index 00000000..ffbde28a --- /dev/null +++ b/actions/docker/cleanup-builder/index.js @@ -0,0 +1,17 @@ +const fs = require("fs"); + +function appendState(name, value) { + const stateFile = process.env.GITHUB_STATE; + if (!stateFile) { + return; + } + + fs.appendFileSync(stateFile, `${name}=${value}\n`, { encoding: "utf8" }); +} + +const enabled = + (process.env.INPUT_ENABLED || "true").trim().toLowerCase() !== "false"; +const builder = (process.env.INPUT_BUILDER || "").trim(); + +appendState("enabled", String(enabled)); +appendState("builder", builder); diff --git a/actions/docker/cleanup-builder/post.js b/actions/docker/cleanup-builder/post.js new file mode 100644 index 00000000..f8e3922c --- /dev/null +++ b/actions/docker/cleanup-builder/post.js @@ -0,0 +1,56 @@ +const { spawnSync } = require("child_process"); + +function info(message) { + process.stdout.write(`${message}\n`); +} + +function warning(message) { + process.stdout.write(`::warning::${message}\n`); +} + +function commandExists(command) { + const result = spawnSync(command, ["--version"], { stdio: "ignore" }); + return result.status === 0; +} + +function builderExists(builder) { + const result = spawnSync("docker", ["buildx", "inspect", builder], { + stdio: "ignore", + }); + return result.status === 0; +} + +const enabled = + (process.env.STATE_enabled || "true").trim().toLowerCase() !== "false"; +const builder = (process.env.STATE_builder || "").trim(); + +if (!enabled) { + info("Buildx cleanup disabled. Skipping builder cleanup."); + process.exit(0); +} + +if (!builder) { + info("No Buildx builder configured for cleanup."); + process.exit(0); +} + +if (!commandExists("docker")) { + warning( + "Docker CLI is unavailable during builder cleanup. Skipping cleanup.", + ); + process.exit(0); +} + +if (!builderExists(builder)) { + info(`Buildx builder "${builder}" is already absent. Skipping cleanup.`); + process.exit(0); +} + +info(`Removing Buildx builder "${builder}".`); +const removeResult = spawnSync("docker", ["buildx", "rm", builder], { + stdio: "inherit", +}); + +if (removeResult.status !== 0) { + warning(`Failed to remove Buildx builder "${builder}".`); +} diff --git a/actions/docker/create-images-manifests/action.yml b/actions/docker/create-images-manifests/action.yml index e65b4b84..c20d16b1 100644 --- a/actions/docker/create-images-manifests/action.yml +++ b/actions/docker/create-images-manifests/action.yml @@ -96,22 +96,18 @@ outputs: runs: using: "composite" steps: - - shell: bash - # FIXME: workaround until will be merged: https://github.com/actions/runner/pull/1684 - run: mkdir -p ./self-actions/ && cp -r $GITHUB_ACTION_PATH/../../* ./self-actions/ + - uses: hoverkraft-tech/ci-github-common/actions/local-actions@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 + with: + source-path: ${{ github.action_path }}/../.. - id: docker-setup - uses: ./self-actions/docker/setup + uses: ./../self-actions/docker/setup with: oci-registry: ${{ inputs.oci-registry }} oci-registry-username: ${{ inputs.oci-registry-username }} oci-registry-password: ${{ inputs.oci-registry-password }} built-images: ${{ inputs.built-images }} - - shell: bash - # FIXME: workaround until will be merged: https://github.com/actions/runner/pull/1684 - run: rm -fr ./self-actions - - id: create-images-manifests name: Create images manifests and push uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 diff --git a/actions/docker/get-image-metadata/action.yml b/actions/docker/get-image-metadata/action.yml index 9de25fb1..fe0b5b9f 100644 --- a/actions/docker/get-image-metadata/action.yml +++ b/actions/docker/get-image-metadata/action.yml @@ -46,25 +46,20 @@ runs: steps: # #region Prepare build variables - - shell: bash - # FIXME: workaround until will be merged: https://github.com/actions/runner/pull/1684 - run: | - [ -d ./self-actions/docker/get-image-name ] || ( mkdir -p ./self-actions/ && cp -r $GITHUB_ACTION_PATH/../../* ./self-actions/ ) + - uses: hoverkraft-tech/ci-github-common/actions/local-actions@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 + with: + source-path: ${{ github.action_path }}/../.. - id: image-name - uses: ./self-actions/docker/get-image-name + uses: ./../self-actions/docker/get-image-name with: image: ${{ inputs.image }} repository: ${{ inputs.repository }} oci-registry: ${{ inputs.oci-registry }} - - shell: bash - # FIXME: workaround until will be merged: https://github.com/actions/runner/pull/1684 - run: rm -fr ./self-actions - - id: get-issue-number if: inputs.tag == '' && (github.event_name == 'pull_request' || github.event_name == 'pull_request_review' || github.event_name == 'issue_comment') - uses: hoverkraft-tech/ci-github-common/actions/get-issue-number@4b53189212d5810f710bed89711002626977215b # 0.33.0 + uses: hoverkraft-tech/ci-github-common/actions/get-issue-number@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 - id: define-metadata-inputs uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 diff --git a/actions/docker/prune-pull-requests-image-tags/action.yml b/actions/docker/prune-pull-requests-image-tags/action.yml index 7f8b7408..b7454568 100644 --- a/actions/docker/prune-pull-requests-image-tags/action.yml +++ b/actions/docker/prune-pull-requests-image-tags/action.yml @@ -39,17 +39,17 @@ inputs: runs: using: "composite" steps: - - shell: bash - # FIXME: workaround until will be merged: https://github.com/actions/runner/pull/1684 - run: mkdir -p ./self-actions/ && cp -r $GITHUB_ACTION_PATH/../../* ./self-actions/ + - uses: hoverkraft-tech/ci-github-common/actions/local-actions@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 + with: + source-path: ${{ github.action_path }}/../.. - id: image-name - uses: ./self-actions/docker/get-image-name + uses: ./../self-actions/docker/get-image-name with: image: ${{ inputs.image }} - id: is-organization-or-user - uses: hoverkraft-tech/ci-github-common/actions/repository-owner-is-organization@4b53189212d5810f710bed89711002626977215b # 0.33.0 + uses: hoverkraft-tech/ci-github-common/actions/repository-owner-is-organization@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 - id: get-tags-to-delete uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -104,14 +104,9 @@ runs: core.info(`Tags to delete: ${tagsString}`); - id: clean-images - uses: ./self-actions/docker/clean-images + uses: ./../self-actions/docker/clean-images if: steps.get-tags-to-delete.outputs.tags-to-delete with: github-token: ${{ inputs.github-token }} package: ${{ steps.image-name.outputs.image-name }} tags: ${{ steps.get-tags-to-delete.outputs.tags-to-delete }} - - - shell: bash - # FIXME: workaround until will be merged: https://github.com/actions/runner/pull/1684 - run: | - rm -fr ./self-actions diff --git a/actions/docker/setup/README.md b/actions/docker/setup/README.md index 77206296..98e56072 100644 --- a/actions/docker/setup/README.md +++ b/actions/docker/setup/README.md @@ -62,6 +62,11 @@ Shared action to configure Docker tooling and OCI registry authentication. # When provided, registry authentication targets are inferred from the built image data. built-images: "" + # Whether the Buildx builder should be removed during post-job cleanup. + # + # Default: `true` + buildx-cleanup: true + # Whether to install and configure Docker Buildx. # # Default: `true` @@ -88,6 +93,7 @@ Shared action to configure Docker tooling and OCI registry authentication. | |
[registry."my-registry.local:5000"]
 http = true
 insecure = true
| | | | **`built-images`** | Optional built images payload used to resolve manifest publication registries. | **false** | - | | | When provided, registry authentication targets are inferred from the built image data. | | | +| **`buildx-cleanup`** | Whether the Buildx builder should be removed during post-job cleanup. | **false** | `true` | | **`setup-buildx`** | Whether to install and configure Docker Buildx. | **false** | `true` | diff --git a/actions/docker/setup/action.yml b/actions/docker/setup/action.yml index 82458bea..aa8cc313 100644 --- a/actions/docker/setup/action.yml +++ b/actions/docker/setup/action.yml @@ -45,6 +45,11 @@ inputs: Whether to install and configure Docker Buildx. default: true required: false + buildx-cleanup: + description: | + Whether the Buildx builder should be removed during post-job cleanup. + default: true + required: false outputs: push-registry: @@ -398,6 +403,7 @@ runs: driver-opts: | image=moby/buildkit:v0.29.0 buildkitd-config-inline: ${{ inputs.buildkitd-config-inline }} + cleanup: ${{ inputs.buildx-cleanup }} - if: steps.resolve-oci-registries.outputs.has-registry-auth == 'true' uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0 diff --git a/actions/helm/generate-docs/action.yml b/actions/helm/generate-docs/action.yml index 82f91f2a..88a58667 100644 --- a/actions/helm/generate-docs/action.yml +++ b/actions/helm/generate-docs/action.yml @@ -129,7 +129,7 @@ runs: } core.setOutput("markdownlint-config-path", markdownlintConfigPath); - - uses: hoverkraft-tech/ci-github-common/actions/checkout@4b53189212d5810f710bed89711002626977215b # 0.33.0 + - uses: hoverkraft-tech/ci-github-common/actions/checkout@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 - uses: losisin/helm-docs-github-action@2ccf3e77eb70dc80d62f8cc26f15d0a96b75fef4 # v1.8.0 with: @@ -231,7 +231,7 @@ runs: app-id: ${{ inputs.github-app-id }} private-key: ${{ inputs.github-app-key }} - - uses: hoverkraft-tech/ci-github-common/actions/create-and-merge-pull-request@4b53189212d5810f710bed89711002626977215b # 0.33.0 + - uses: hoverkraft-tech/ci-github-common/actions/create-and-merge-pull-request@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 with: github-token: ${{ steps.generate-token.outputs.token || inputs.github-token }} branch: docs/update-helm-chart-docs-${{ steps.prepare-variables.outputs.working-directory-name }} diff --git a/actions/helm/release-chart/action.yml b/actions/helm/release-chart/action.yml index 6de02c70..7482ff97 100644 --- a/actions/helm/release-chart/action.yml +++ b/actions/helm/release-chart/action.yml @@ -76,7 +76,7 @@ outputs: runs: using: "composite" steps: - - uses: hoverkraft-tech/ci-github-common/actions/checkout@4b53189212d5810f710bed89711002626977215b # 0.33.0 + - uses: hoverkraft-tech/ci-github-common/actions/checkout@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 - id: chart-values-updates uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 diff --git a/actions/helm/test-chart/action.yml b/actions/helm/test-chart/action.yml index 0caafe40..f1f036d1 100644 --- a/actions/helm/test-chart/action.yml +++ b/actions/helm/test-chart/action.yml @@ -72,7 +72,7 @@ runs: echo "::error ::At least one of 'enable-lint' or 'enable-install' input must be true" exit 1 - - uses: hoverkraft-tech/ci-github-common/actions/checkout@4b53189212d5810f710bed89711002626977215b # 0.33.0 + - uses: hoverkraft-tech/ci-github-common/actions/checkout@a236f015b7dda4712d2ba4d327b8bf27be4c3d3a # 0.34.0 with: fetch-depth: 0