Created
April 1, 2026 07:08
-
-
Save flavio/940a2366b205a86b7eccfcfb0e444ef2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From 7033461ce10d6928873787832b559454f41c6492 Mon Sep 17 00:00:00 2001 | |
| From: Flavio Castelli <[email protected]> | |
| Date: Wed, 1 Apr 2026 09:04:52 +0200 | |
| Subject: [PATCH] fix(ci): allow to specify program versions | |
| Sometimes it's still useful to be able to change the default program | |
| version to install without having to tag a new version of this | |
| repository. | |
| That's especially true when dealing with kwctl bumps. | |
| Signed-off-by: Flavio Castelli <[email protected]> | |
| --- | |
| binaryen-installer/action.yml | 13 +++++++++++-- | |
| crane-installer/action.yml | 13 +++++++++++-- | |
| kubernetes-bom-installer/action.yml | 18 +++++++++++++++--- | |
| kwctl-installer/action.yml | 7 ++++++- | |
| opa-installer/action.yml | 13 +++++++++++-- | |
| policy-build-tinygo/action.yml | 12 ++++++++++-- | |
| syft-installer/action.yml | 24 ++++++++++++++++++++---- | |
| tarpaulin-install/action.yml | 13 +++++++++++-- | |
| 8 files changed, 95 insertions(+), 18 deletions(-) | |
| diff --git a/binaryen-installer/action.yml b/binaryen-installer/action.yml | |
| index 8cd20de..b2e599a 100644 | |
| --- a/binaryen-installer/action.yml | |
| +++ b/binaryen-installer/action.yml | |
| @@ -3,6 +3,15 @@ description: "Install binaryen and includes it inside of PATH" | |
| branding: | |
| icon: "package" | |
| color: "blue" | |
| +inputs: | |
| + VERSION: | |
| + description: "binaryen release to be installed" | |
| + required: false | |
| + default: "116" | |
| + CHECKSUM: | |
| + description: "SHA256 checksum of the binaryen release tarball" | |
| + required: false | |
| + default: "c55b74f3109cdae97490faf089b0286d3bba926bb6ea5ed00c8c784fc53718fd" | |
| runs: | |
| using: "composite" | |
| steps: | |
| @@ -11,8 +20,8 @@ runs: | |
| #!/bin/bash | |
| set -e | |
| - VERSION="116" | |
| - CHECKSUM="c55b74f3109cdae97490faf089b0286d3bba926bb6ea5ed00c8c784fc53718fd" | |
| + VERSION="${{ inputs.VERSION }}" | |
| + CHECKSUM="${{ inputs.CHECKSUM }}" | |
| INSTALL_DIR=$HOME/.binaryen | |
| mkdir -p $INSTALL_DIR | |
| diff --git a/crane-installer/action.yml b/crane-installer/action.yml | |
| index df7d3d7..350635c 100644 | |
| --- a/crane-installer/action.yml | |
| +++ b/crane-installer/action.yml | |
| @@ -3,6 +3,15 @@ description: 'Install crane and includes it inside of PATH' | |
| branding: | |
| icon: 'package' | |
| color: 'blue' | |
| +inputs: | |
| + VERSION: | |
| + description: 'crane release to be installed' | |
| + required: false | |
| + default: "0.15.2" | |
| + CHECKSUM: | |
| + description: "SHA256 checksum of the crane release tarball" | |
| + required: false | |
| + default: "bd5f72ae96373ac640679a6108280b6d76698773ca21f293ae30cc17413e2ad1" | |
| runs: | |
| using: "composite" | |
| steps: | |
| @@ -11,8 +20,8 @@ runs: | |
| #!/bin/bash | |
| set -e | |
| - VERSION="0.15.2" | |
| - CHECKSUM="bd5f72ae96373ac640679a6108280b6d76698773ca21f293ae30cc17413e2ad1" | |
| + VERSION="${{ inputs.VERSION }}" | |
| + CHECKSUM="${{ inputs.CHECKSUM }}" | |
| INSTALL_DIR=$HOME/.crane | |
| mkdir -p $INSTALL_DIR | |
| diff --git a/kubernetes-bom-installer/action.yml b/kubernetes-bom-installer/action.yml | |
| index fa1521d..d087db3 100644 | |
| --- a/kubernetes-bom-installer/action.yml | |
| +++ b/kubernetes-bom-installer/action.yml | |
| @@ -4,10 +4,22 @@ branding: | |
| icon: 'package' | |
| color: 'blue' | |
| inputs: | |
| + version: | |
| + description: 'Kubernetes bom command version to be installed' | |
| + required: false | |
| + default: "v0.3.0" | |
| arch: | |
| description: "Architecture to install (linux-amd64, linux-arm64)" | |
| required: false | |
| default: "linux-amd64" | |
| + CHECKSUM_LINUX_AMD64: | |
| + description: "SHA256 checksum of the linux-amd64 release tarball" | |
| + required: false | |
| + default: "314b1713c3350cd063f2330fba25766860011c8e193fbae30da2d8b58cc3ac13" | |
| + CHECKSUM_LINUX_ARM64: | |
| + description: "SHA256 checksum of the linux-arm64 release tarball" | |
| + required: false | |
| + default: "451698ad7124aedc14d02f1cc48bbc41d687f42509e6fa0272ac37bf28abb74c" | |
| runs: | |
| using: "composite" | |
| steps: | |
| @@ -16,13 +28,13 @@ runs: | |
| #!/bin/bash | |
| set -e | |
| - VERSION="v0.3.0" | |
| + VERSION="${{ inputs.version }}" | |
| ARCH="${{ inputs.arch }}" | |
| INSTALL_DIR=$HOME/.bom-generator | |
| case "${ARCH}" in | |
| - linux-amd64) CHECKSUM="314b1713c3350cd063f2330fba25766860011c8e193fbae30da2d8b58cc3ac13" ;; | |
| - linux-arm64) CHECKSUM="451698ad7124aedc14d02f1cc48bbc41d687f42509e6fa0272ac37bf28abb74c" ;; | |
| + linux-amd64) CHECKSUM="${{ inputs.CHECKSUM_LINUX_AMD64 }}" ;; | |
| + linux-arm64) CHECKSUM="${{ inputs.CHECKSUM_LINUX_ARM64 }}" ;; | |
| *) echo "Unsupported arch: ${ARCH}. Supported values: linux-amd64, linux-arm64"; exit 1 ;; | |
| esac | |
| diff --git a/kwctl-installer/action.yml b/kwctl-installer/action.yml | |
| index a37714a..fde2ccf 100644 | |
| --- a/kwctl-installer/action.yml | |
| +++ b/kwctl-installer/action.yml | |
| @@ -3,6 +3,11 @@ description: "Install kwctl and includes it inside of PATH" | |
| branding: | |
| icon: "package" | |
| color: "blue" | |
| +inputs: | |
| + KWCTL_VERSION: | |
| + description: "kwctl release to be installed" | |
| + required: false | |
| + default: "v1.33.1" | |
| runs: | |
| using: "composite" | |
| steps: | |
| @@ -11,7 +16,7 @@ runs: | |
| #!/bin/bash | |
| set -e | |
| - KWCTL_VERSION="v1.33.1" | |
| + KWCTL_VERSION="${{ inputs.KWCTL_VERSION }}" | |
| # Build name of gihub release asset | |
| OS=$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]' | sed 's/macos/darwin/') | |
| diff --git a/opa-installer/action.yml b/opa-installer/action.yml | |
| index 1de0e33..bd9e667 100644 | |
| --- a/opa-installer/action.yml | |
| +++ b/opa-installer/action.yml | |
| @@ -3,6 +3,15 @@ description: "Install opa and add it to PATH" | |
| branding: | |
| icon: "package" | |
| color: "blue" | |
| +inputs: | |
| + opa-version: | |
| + description: "opa release to be installed" | |
| + required: false | |
| + default: "v0.65.0" | |
| + CHECKSUM: | |
| + description: "SHA256 checksum of the opa release binary" | |
| + required: false | |
| + default: "cd6b0b2d762571a746f0261890b155e6dd71cca90dad6b42b6fcf6dd7f619f08" | |
| runs: | |
| using: "composite" | |
| steps: | |
| @@ -11,8 +20,8 @@ runs: | |
| #!/bin/bash | |
| set -e | |
| - VERSION="v0.65.0" | |
| - CHECKSUM="cd6b0b2d762571a746f0261890b155e6dd71cca90dad6b42b6fcf6dd7f619f08" | |
| + VERSION="${{ inputs.opa-version }}" | |
| + CHECKSUM="${{ inputs.CHECKSUM }}" | |
| INSTALL_DIR=$HOME/.opa | |
| mkdir -p $INSTALL_DIR | |
| diff --git a/policy-build-tinygo/action.yml b/policy-build-tinygo/action.yml | |
| index 0c4e700..e332dd9 100644 | |
| --- a/policy-build-tinygo/action.yml | |
| +++ b/policy-build-tinygo/action.yml | |
| @@ -4,6 +4,14 @@ branding: | |
| icon: "package" | |
| color: "blue" | |
| inputs: | |
| + tinygo-version: | |
| + required: false | |
| + description: "Version of tinygo to use" | |
| + default: "0.39.0" | |
| + tinygo-checksum: | |
| + required: false | |
| + description: "SHA256 checksum of the tinygo release .deb package" | |
| + default: "775f15974e35059c8f3a141266bd9d293b5d556a3e44d5e6356c5602e9f386ab" | |
| generate-sbom: | |
| required: false | |
| description: "Generate and sign SBOM files" | |
| @@ -25,8 +33,8 @@ runs: | |
| - name: Install tinygo | |
| shell: bash | |
| run: | | |
| - TINYGO_VERSION="0.39.0" | |
| - TINYGO_CHECKSUM="775f15974e35059c8f3a141266bd9d293b5d556a3e44d5e6356c5602e9f386ab" | |
| + TINYGO_VERSION="${{ inputs.tinygo-version }}" | |
| + TINYGO_CHECKSUM="${{ inputs.tinygo-checksum }}" | |
| TINYGO_DEB="tinygo_${TINYGO_VERSION}_amd64.deb" | |
| wget https://github.com/tinygo-org/tinygo/releases/download/v${TINYGO_VERSION}/${TINYGO_DEB} | |
| echo "${TINYGO_CHECKSUM} ${TINYGO_DEB}" | sha256sum --check | |
| diff --git a/syft-installer/action.yml b/syft-installer/action.yml | |
| index 8355d5b..2979606 100644 | |
| --- a/syft-installer/action.yml | |
| +++ b/syft-installer/action.yml | |
| @@ -4,10 +4,26 @@ branding: | |
| icon: "package" | |
| color: "blue" | |
| inputs: | |
| + VERSION: | |
| + description: "syft release to be installed" | |
| + required: false | |
| + default: "1.28.0" | |
| arch: | |
| description: "syft arch to be installed (linux_amd64, windows_amd64, darwin_amd64)" | |
| required: false | |
| default: "linux_amd64" | |
| + CHECKSUM_LINUX_AMD64: | |
| + description: "SHA256 checksum of the linux_amd64 release tarball" | |
| + required: false | |
| + default: "3edee7fe1ceb1f78360e547f57048930d57f00c7ec3d0b8bdfb902805f048468" | |
| + CHECKSUM_DARWIN_AMD64: | |
| + description: "SHA256 checksum of the darwin_amd64 release tarball" | |
| + required: false | |
| + default: "15067673a0ea8aeba31e2a53deb1633eac5c0024ab73bdff91cffb157735d90a" | |
| + CHECKSUM_WINDOWS_AMD64: | |
| + description: "SHA256 checksum of the windows_amd64 release zip" | |
| + required: false | |
| + default: "a1637fdc074e9c80c6bf900df26a883516bf32e90499e3bd9aa314493d40a0a8" | |
| runs: | |
| using: "composite" | |
| steps: | |
| @@ -16,14 +32,14 @@ runs: | |
| #!/bin/bash | |
| set -e | |
| - VERSION="1.28.0" | |
| + VERSION="${{ inputs.VERSION }}" | |
| ARCH="${{ inputs.arch }}" | |
| INSTALL_DIR=$HOME/.syft | |
| case "${ARCH}" in | |
| - linux_amd64) CHECKSUM="3edee7fe1ceb1f78360e547f57048930d57f00c7ec3d0b8bdfb902805f048468" ;; | |
| - darwin_amd64) CHECKSUM="15067673a0ea8aeba31e2a53deb1633eac5c0024ab73bdff91cffb157735d90a" ;; | |
| - windows_amd64) CHECKSUM="a1637fdc074e9c80c6bf900df26a883516bf32e90499e3bd9aa314493d40a0a8" ;; | |
| + linux_amd64) CHECKSUM="${{ inputs.CHECKSUM_LINUX_AMD64 }}" ;; | |
| + darwin_amd64) CHECKSUM="${{ inputs.CHECKSUM_DARWIN_AMD64 }}" ;; | |
| + windows_amd64) CHECKSUM="${{ inputs.CHECKSUM_WINDOWS_AMD64 }}" ;; | |
| *) echo "Unsupported arch: ${ARCH}. Supported values: linux_amd64, windows_amd64, darwin_amd64"; exit 1 ;; | |
| esac | |
| diff --git a/tarpaulin-install/action.yml b/tarpaulin-install/action.yml | |
| index 9b7e7d5..45ffa50 100644 | |
| --- a/tarpaulin-install/action.yml | |
| +++ b/tarpaulin-install/action.yml | |
| @@ -3,6 +3,15 @@ description: 'Installs tarpaulin and includes it inside of PATH' | |
| branding: | |
| icon: 'package' | |
| color: 'blue' | |
| +inputs: | |
| + VERSION: | |
| + description: 'tarpaulin release to be installed' | |
| + required: false | |
| + default: "0.35.2" | |
| + CHECKSUM: | |
| + description: "SHA256 checksum of the tarpaulin release tarball" | |
| + required: false | |
| + default: "7364496b9fee593263a23738068003e847c2a468d36fbe99af99c279f14f70dd" | |
| runs: | |
| using: "composite" | |
| steps: | |
| @@ -11,8 +20,8 @@ runs: | |
| #!/bin/bash | |
| set -e | |
| - VERSION="0.35.2" | |
| - CHECKSUM="7364496b9fee593263a23738068003e847c2a468d36fbe99af99c279f14f70dd" | |
| + VERSION="${{ inputs.VERSION }}" | |
| + CHECKSUM="${{ inputs.CHECKSUM }}" | |
| ASSET="cargo-tarpaulin-x86_64-unknown-linux-musl.tar.gz" | |
| INSTALL_DIR=$HOME/.tarpaulin | |
| -- | |
| 2.51.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment