From d331d60c8c243bbf191d46af45c4b07aa28253c1 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Tue, 2 Jul 2024 13:38:20 +0000 Subject: [PATCH 01/41] Updating github-config --- .github/workflows/create-draft-release.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/create-draft-release.yml b/.github/workflows/create-draft-release.yml index 8474cab..acc723e 100644 --- a/.github/workflows/create-draft-release.yml +++ b/.github/workflows/create-draft-release.yml @@ -66,16 +66,19 @@ jobs: uses: actions/setup-go@v3 with: go-version: 'stable' + - name: Checkout uses: actions/checkout@v3 with: fetch-tags: true + - name: Reset Draft Release id: reset uses: paketo-buildpacks/github-config/actions/release/reset-draft@main with: repo: ${{ github.repository }} token: ${{ github.token }} + - name: Calculate Semver Tag if: github.event.inputs.version == '' id: semver @@ -84,6 +87,7 @@ jobs: repo: ${{ github.repository }} token: ${{ github.token }} ref-name: ${{ github.ref_name }} + - name: Set Release Tag id: tag run: | @@ -92,14 +96,28 @@ jobs: tag="${{ steps.semver.outputs.tag }}" fi echo "tag=${tag}" >> "$GITHUB_OUTPUT" + - name: Package run: ./scripts/package.sh --version "${{ steps.tag.outputs.tag }}" + + - name: Get buildpack type + id: get_buildpack_type + run: | + + if [ -f "extension.toml" ]; then + echo "buildpack_type=extension" >> "$GITHUB_OUTPUT" + else + echo "buildpack_type=buildpack" >> "$GITHUB_OUTPUT" + fi + - name: Create Release Notes id: create-release-notes uses: paketo-buildpacks/github-config/actions/release/notes@main with: repo: ${{ github.repository }} token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} + buildpack_type: ${{ steps.get_buildpack_type.outputs.buildpack_type }} + - name: Create Release uses: paketo-buildpacks/github-config/actions/release/create@main with: From 33ea15e2a2fee46f77dc10160f46f838e8eb4f7e Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Wed, 3 Jul 2024 13:38:34 +0000 Subject: [PATCH 02/41] Updating github-config --- .github/workflows/push-buildpackage.yml | 28 ++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push-buildpackage.yml b/.github/workflows/push-buildpackage.yml index f96478e..4d24bb2 100644 --- a/.github/workflows/push-buildpackage.yml +++ b/.github/workflows/push-buildpackage.yml @@ -4,6 +4,8 @@ on: release: types: - published +env: + REGISTRIES_FILENAME: "registries.json" jobs: push: @@ -11,6 +13,9 @@ jobs: runs-on: ubuntu-22.04 steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Parse Event id: event run: | @@ -30,6 +35,26 @@ jobs: output: "/github/workspace/buildpackage.cnb" token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} + - name: Parse Configs + id: parse_configs + run: | + registries_filename="${{ env.REGISTRIES_FILENAME }}" + + push_to_dockerhub=true + push_to_gcr=true + + if [[ -f $registries_filename ]]; then + if jq 'has("dockerhub")' $registries_filename > /dev/null; then + push_to_dockerhub=$(jq '.dockerhub' $registries_filename) + fi + if jq 'has("GCR")' $registries_filename > /dev/null; then + push_to_gcr=$(jq '.GCR' $registries_filename) + fi + fi + + echo "push_to_dockerhub=${push_to_dockerhub}" >> "$GITHUB_OUTPUT" + echo "push_to_gcr=${push_to_gcr}" >> "$GITHUB_OUTPUT" + - name: Validate version run: | buidpackTomlVersion=$(sudo skopeo inspect "oci-archive:${GITHUB_WORKSPACE}/buildpackage.cnb" | jq -r '.Labels."io.buildpacks.buildpackage.metadata" | fromjson | .version') @@ -40,6 +65,7 @@ jobs: fi - name: Push to GCR + if: ${{ steps.parse_configs.outputs.push_to_gcr == 'true' }} env: GCR_PUSH_BOT_JSON_KEY: ${{ secrets.GCR_PUSH_BOT_JSON_KEY }} run: | @@ -50,7 +76,7 @@ jobs: sudo skopeo copy "oci-archive:${GITHUB_WORKSPACE}/buildpackage.cnb" "docker://gcr.io/${{ github.repository }}:latest" - name: Push to DockerHub - id: push + if: ${{ steps.parse_configs.outputs.push_to_dockerhub == 'true' }} env: DOCKERHUB_USERNAME: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_USERNAME }} DOCKERHUB_PASSWORD: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_PASSWORD }} From 6904391965a0ebf5fc87c51dbdd3f84ee8a0b0dc Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Thu, 11 Jul 2024 13:37:33 +0000 Subject: [PATCH 03/41] Updating github-config --- .github/workflows/push-buildpackage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/push-buildpackage.yml b/.github/workflows/push-buildpackage.yml index 4d24bb2..390ce27 100644 --- a/.github/workflows/push-buildpackage.yml +++ b/.github/workflows/push-buildpackage.yml @@ -77,6 +77,7 @@ jobs: - name: Push to DockerHub if: ${{ steps.parse_configs.outputs.push_to_dockerhub == 'true' }} + id: push env: DOCKERHUB_USERNAME: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_USERNAME }} DOCKERHUB_PASSWORD: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_PASSWORD }} From bc7238e94cca85a245f21a2f8c9c28a47572d621 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Fri, 12 Jul 2024 13:39:02 +0000 Subject: [PATCH 04/41] Updating github-config --- .github/workflows/update-go-mod-version.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-go-mod-version.yml b/.github/workflows/update-go-mod-version.yml index 2cc949c..b68db8a 100644 --- a/.github/workflows/update-go-mod-version.yml +++ b/.github/workflows/update-go-mod-version.yml @@ -27,7 +27,7 @@ jobs: id: current-go-version uses: paketo-buildpacks/github-config/actions/update-go-mod-version@main with: - toolchain-version: ${{ steps.setup-go.outputs.go-version }} + go-version: ${{ steps.setup-go.outputs.go-version }} - name: Go mod tidy run: | #!/usr/bin/env bash @@ -54,7 +54,7 @@ jobs: id: commit uses: paketo-buildpacks/github-config/actions/pull-request/create-commit@main with: - message: "Updates go mod toolchain version to ${{ steps.setup-go.outputs.go-version }}" + message: "Updates go mod version to ${{ steps.setup-go.outputs.go-version }}" pathspec: "." keyid: ${{ secrets.PAKETO_BOT_GPG_SIGNING_KEY_ID }} key: ${{ secrets.PAKETO_BOT_GPG_SIGNING_KEY }} @@ -70,7 +70,7 @@ jobs: uses: paketo-buildpacks/github-config/actions/pull-request/open@main with: token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} - title: "Updates go mod toolchain version to ${{ steps.setup-go.outputs.go-version }}" + title: "Updates go mod version to ${{ steps.setup-go.outputs.go-version }}" branch: automation/go-mod-update/update-main failure: From 11ab18b7d6fbfefdeb0c5659b5fa4f4f56e25614 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Wed, 4 Sep 2024 13:42:26 +0000 Subject: [PATCH 05/41] Updating github-config --- .github/workflows/test-pull-request.yml | 2 ++ scripts/unit.sh | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index 6574ff7..f1b3dc0 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -26,6 +26,8 @@ jobs: uses: actions/checkout@v3 - name: Run Unit Tests + env: + GO_TEST_PARAMS: -count=5 run: ./scripts/unit.sh - name: Get builders from integration.json diff --git a/scripts/unit.sh b/scripts/unit.sh index 8e193c7..dd130bf 100755 --- a/scripts/unit.sh +++ b/scripts/unit.sh @@ -6,6 +6,8 @@ set -o pipefail readonly PROGDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" readonly BUILDPACKDIR="$(cd "${PROGDIR}/.." && pwd)" +GO_TEST_PARAMS="${GO_TEST_PARAMS:-}" + # shellcheck source=SCRIPTDIR/.util/tools.sh source "${PROGDIR}/.util/tools.sh" @@ -50,7 +52,7 @@ function unit::run() { testout=$(mktemp) pushd "${BUILDPACKDIR}" > /dev/null - if go test ./... -v -run Unit | tee "${testout}"; then + if go test ./... -v ${GO_TEST_PARAMS} -run Unit | tee "${testout}"; then util::tools::tests::checkfocus "${testout}" util::print::success "** GO Test Succeeded **" else From 7959b5fc2cf2d43b986cf3d21fd1bba4910756d5 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Tue, 10 Sep 2024 13:40:49 +0000 Subject: [PATCH 06/41] Updating github-config --- scripts/.util/tools.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index e2e977d..6a5dbdb 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { - "createpackage": "v1.70.0", - "jam": "v2.8.0", - "pack": "v0.34.2" + "createpackage": "v1.71.0", + "jam": "v2.9.0", + "pack": "v0.35.1" } From 8796cb8e7a4c15b5712010ceebf1ddeafa55bd62 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Fri, 11 Oct 2024 13:41:48 +0000 Subject: [PATCH 07/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 6a5dbdb..4a31bfd 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { - "createpackage": "v1.71.0", + "createpackage": "v1.72.0", "jam": "v2.9.0", "pack": "v0.35.1" } From d7b95d9afa3d62bfe22628b2313f3049e7a814bb Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Fri, 18 Oct 2024 13:44:19 +0000 Subject: [PATCH 08/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 4a31bfd..cb1e440 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.72.0", - "jam": "v2.9.0", + "jam": "v2.10.0", "pack": "v0.35.1" } From eab3076030f0e7c2560b2f35d4fba8f4df465351 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Sat, 23 Nov 2024 13:41:58 +0000 Subject: [PATCH 09/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index cb1e440..5fb8661 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.72.0", - "jam": "v2.10.0", + "jam": "v2.10.1", "pack": "v0.35.1" } From 86126c5d97cbcf8de754eb618085f4556e751836 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Thu, 28 Nov 2024 13:47:23 +0000 Subject: [PATCH 10/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 5fb8661..fd5add7 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.72.0", "jam": "v2.10.1", - "pack": "v0.35.1" + "pack": "v0.36.0" } From bb846586b9a7763ff5312376934be92e0a6f0155 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Sat, 7 Dec 2024 13:40:53 +0000 Subject: [PATCH 11/41] Updating github-config --- .github/workflows/test-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index f1b3dc0..cd25980 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -82,7 +82,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: event-payload path: ${{ github.event_path }} From 0be03210b7b4ae9c1955e3638835f48e82066aa3 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Fri, 13 Dec 2024 13:45:20 +0000 Subject: [PATCH 12/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index fd5add7..046c8c9 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { - "createpackage": "v1.72.0", + "createpackage": "v1.72.1", "jam": "v2.10.1", "pack": "v0.36.0" } From dbb53cc1d11af7111df785c3be5af92d959bd8cb Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Wed, 18 Dec 2024 13:43:11 +0000 Subject: [PATCH 13/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 046c8c9..5fd7d99 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.72.1", "jam": "v2.10.1", - "pack": "v0.36.0" + "pack": "v0.36.1" } From 2db0e72506193854515b71f1107621dd4d6e0bc3 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Sat, 28 Dec 2024 13:37:09 +0000 Subject: [PATCH 14/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 5fd7d99..afaf456 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.72.1", "jam": "v2.10.1", - "pack": "v0.36.1" + "pack": "v0.36.2" } From fd948de25894413d468047f80ff24c0a424a78c0 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Tue, 7 Jan 2025 15:11:29 +0000 Subject: [PATCH 15/41] Updating github-config --- scripts/.util/tools.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/.util/tools.sh b/scripts/.util/tools.sh index 801e6ac..8feecf3 100644 --- a/scripts/.util/tools.sh +++ b/scripts/.util/tools.sh @@ -142,12 +142,10 @@ function util::tools::pack::install() { pack_config_enable_experimental="false" fi - tmp_location="/tmp/pack.tgz" curl_args=( "--fail" "--silent" "--location" - "--output" "${tmp_location}" ) if [[ "${token}" != "" ]]; then @@ -160,16 +158,14 @@ function util::tools::pack::install() { arch=$(util::tools::arch --blank-amd64) curl "https://github.com/buildpacks/pack/releases/download/${version}/pack-${version}-${os}${arch:+-$arch}.tgz" \ - "${curl_args[@]}" - - tar xzf "${tmp_location}" -C "${dir}" + "${curl_args[@]}" | \ + tar xzf - -C "${dir}" chmod +x "${dir}/pack" if [[ "${pack_config_enable_experimental}" == "true" ]]; then "${dir}"/pack config experimental true fi - rm "${tmp_location}" else util::print::info "Using pack $("${dir}"/pack version)" fi From aa1305729c16f035d998ef9a2f46f47c593c7f70 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Thu, 16 Jan 2025 13:41:05 +0000 Subject: [PATCH 16/41] Updating github-config --- scripts/.util/tools.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index afaf456..7ef62ab 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.72.1", - "jam": "v2.10.1", - "pack": "v0.36.2" + "jam": "v2.11.1", + "pack": "v0.36.3" } From 9a5471d71ce26666746b11b5b9ae0a0f8563a845 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Sun, 19 Jan 2025 13:37:49 +0000 Subject: [PATCH 17/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 7ef62ab..47cc21e 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.72.1", "jam": "v2.11.1", - "pack": "v0.36.3" + "pack": "v0.36.4" } From 0824ed2aca31e66a3dc6c0846309d5b45670c2f1 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Fri, 28 Feb 2025 13:34:14 +0000 Subject: [PATCH 18/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 47cc21e..88cfa3d 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { - "createpackage": "v1.72.1", + "createpackage": "v1.73.0", "jam": "v2.11.1", "pack": "v0.36.4" } From e42e8b644aaca229e1f3bed0daf0c0a1bfdcad1a Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Sun, 23 Mar 2025 13:33:05 +0000 Subject: [PATCH 19/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 88cfa3d..9d1776a 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.73.0", "jam": "v2.11.1", - "pack": "v0.36.4" + "pack": "v0.37.0" } From 316755933aeb0214329996643daf9bee410eafb2 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Mon, 31 Mar 2025 13:37:19 +0000 Subject: [PATCH 20/41] Updating github-config --- .github/workflows/push-buildpackage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-buildpackage.yml b/.github/workflows/push-buildpackage.yml index 390ce27..c2f5a39 100644 --- a/.github/workflows/push-buildpackage.yml +++ b/.github/workflows/push-buildpackage.yml @@ -41,7 +41,7 @@ jobs: registries_filename="${{ env.REGISTRIES_FILENAME }}" push_to_dockerhub=true - push_to_gcr=true + push_to_gcr=false if [[ -f $registries_filename ]]; then if jq 'has("dockerhub")' $registries_filename > /dev/null; then From 60634eba92405dc40c346f20b73519b562149944 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Thu, 10 Apr 2025 13:37:45 +0000 Subject: [PATCH 21/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 9d1776a..fee488a 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.73.0", - "jam": "v2.11.1", + "jam": "v2.11.2", "pack": "v0.37.0" } From 55f151ad47c19a0f91826a3e5c3cc4a2b3a311dc Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Fri, 2 May 2025 13:37:10 +0000 Subject: [PATCH 22/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index fee488a..b4fb180 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.73.0", - "jam": "v2.11.2", + "jam": "v2.11.4", "pack": "v0.37.0" } From 854349b025dfb184779562d321665dccd5cbc3a3 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Sat, 17 May 2025 13:35:03 +0000 Subject: [PATCH 23/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index b4fb180..89988cc 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.73.0", - "jam": "v2.11.4", + "jam": "v2.11.5", "pack": "v0.37.0" } From 99486c67b4023ebd911bab51cfd85c03dba627ec Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Sun, 18 May 2025 13:35:05 +0000 Subject: [PATCH 24/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 89988cc..8328680 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { - "createpackage": "v1.73.0", + "createpackage": "v2.0.0", "jam": "v2.11.5", "pack": "v0.37.0" } From 86b959fb7368981a57d1c8abe2fba1a769c6c8c1 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Tue, 10 Jun 2025 13:40:45 +0000 Subject: [PATCH 25/41] Updating github-config --- scripts/.util/tools.json | 1 - scripts/.util/tools.sh | 27 --------------------------- scripts/integration.sh | 3 --- 3 files changed, 31 deletions(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 8328680..b7c7d01 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,4 @@ { - "createpackage": "v2.0.0", "jam": "v2.11.5", "pack": "v0.37.0" } diff --git a/scripts/.util/tools.sh b/scripts/.util/tools.sh index 8feecf3..3bb7295 100644 --- a/scripts/.util/tools.sh +++ b/scripts/.util/tools.sh @@ -196,33 +196,6 @@ function util::tools::packager::install () { fi } -function util::tools::create-package::install () { - local dir version - while [[ "${#}" != 0 ]]; do - case "${1}" in - --directory) - dir="${2}" - shift 2 - ;; - - *) - util::print::error "unknown argument \"${1}\"" - ;; - - esac - done - - version="$(jq -r .createpackage "$(dirname "${BASH_SOURCE[0]}")/tools.json")" - - mkdir -p "${dir}" - util::tools::path::export "${dir}" - - if [[ ! -f "${dir}/create-package" ]]; then - util::print::title "Installing create-package" - GOBIN="${dir}" go install -ldflags="-s -w" "github.com/paketo-buildpacks/libpak/cmd/create-package@${version}" - fi -} - function util::tools::tests::checkfocus() { testout="${1}" if grep -q 'Focused: [1-9]' "${testout}"; then diff --git a/scripts/integration.sh b/scripts/integration.sh index 46ffbdb..690005f 100755 --- a/scripts/integration.sh +++ b/scripts/integration.sh @@ -110,9 +110,6 @@ function tools::install() { --directory "${BUILDPACKDIR}/.bin" \ --token "${token}" - util::tools::create-package::install \ - --directory "${BUILDPACKDIR}/.bin" - if [[ -f "${BUILDPACKDIR}/.libbuildpack" ]]; then util::tools::packager::install \ --directory "${BUILDPACKDIR}/.bin" From 05d3693c265218bedeb989fda08c62d59000cf0b Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Sun, 15 Jun 2025 13:36:28 +0000 Subject: [PATCH 26/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index b7c7d01..93a8b91 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,4 +1,4 @@ { "jam": "v2.11.5", - "pack": "v0.37.0" + "pack": "v0.38.0" } From 5903971979687ddf40557ec7f9aee816d5003e96 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Tue, 17 Jun 2025 13:39:59 +0000 Subject: [PATCH 27/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 93a8b91..3951713 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,4 +1,4 @@ { "jam": "v2.11.5", - "pack": "v0.38.0" + "pack": "v0.38.1" } From 62b4a8e981dac319a32b7e1f2f5c4b48926138d3 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Fri, 20 Jun 2025 13:39:10 +0000 Subject: [PATCH 28/41] Updating github-config --- scripts/.util/tools.json | 2 + scripts/.util/tools.sh | 87 ++++++++++++++++++++++++++++++++++++++++ scripts/integration.sh | 6 +++ 3 files changed, 95 insertions(+) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 3951713..d749eda 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,4 +1,6 @@ { + "createpackage": "v1.73.0", "jam": "v2.11.5", + "libpaktools": "v0.2.0", "pack": "v0.38.1" } diff --git a/scripts/.util/tools.sh b/scripts/.util/tools.sh index 3bb7295..56c0cf3 100644 --- a/scripts/.util/tools.sh +++ b/scripts/.util/tools.sh @@ -31,6 +31,8 @@ function util::tools::arch() { amd64|x86_64) if [[ "${1:-}" == "--blank-amd64" ]]; then echo "" + elif [[ "${1:-}" == "--format-amd64-x86_64" ]]; then + echo "x86_64" else echo "amd64" fi @@ -196,6 +198,91 @@ function util::tools::packager::install () { fi } +function util::tools::libpak-tools::install () { + local dir token + token="" + + while [[ "${#}" != 0 ]]; do + case "${1}" in + --directory) + dir="${2}" + shift 2 + ;; + + --token) + token="${2}" + shift 2 + ;; + + *) + util::print::error "unknown argument \"${1}\"" + esac + done + + mkdir -p "${dir}" + util::tools::path::export "${dir}" + + + if [[ ! -f "${dir}/libpak-tools" ]]; then + local version curl_args os arch + + version="$(jq -r .libpaktools "$(dirname "${BASH_SOURCE[0]}")/tools.json")" + + curl_args=( + "--fail" + "--silent" + "--location" + "--output" "${dir}/libpak-tools.tar.gz" + ) + + if [[ "${token}" != "" ]]; then + curl_args+=("--header" "Authorization: Token ${token}") + fi + + util::print::title "Installing libpak-tools ${version}" + + os=$(util::tools::os) + arch=$(util::tools::arch --format-amd64-x86_64) + + curl "https://github.com/paketo-buildpacks/libpak-tools/releases/download/${version}/libpak-tools_${os^}_${arch}.tar.gz" \ + "${curl_args[@]}" + + tar -xzf "${dir}/libpak-tools.tar.gz" -C $dir + rm "${dir}/libpak-tools.tar.gz" + + chmod +x "${dir}/libpak-tools" + else + util::print::info "Using libpak-tools" + fi +} + +function util::tools::create-package::install () { + local dir version + while [[ "${#}" != 0 ]]; do + case "${1}" in + --directory) + dir="${2}" + shift 2 + ;; + + *) + util::print::error "unknown argument \"${1}\"" + ;; + + esac + done + + version="$(jq -r .createpackage "$(dirname "${BASH_SOURCE[0]}")/tools.json")" + + mkdir -p "${dir}" + util::tools::path::export "${dir}" + + if [[ ! -f "${dir}/create-package" ]]; then + util::print::title "Installing create-package" + GOBIN="${dir}" go install -ldflags="-s -w" "github.com/paketo-buildpacks/libpak/cmd/create-package@${version}" + fi +} + function util::tools::tests::checkfocus() { testout="${1}" if grep -q 'Focused: [1-9]' "${testout}"; then diff --git a/scripts/integration.sh b/scripts/integration.sh index 690005f..5de24a6 100755 --- a/scripts/integration.sh +++ b/scripts/integration.sh @@ -110,6 +110,12 @@ function tools::install() { --directory "${BUILDPACKDIR}/.bin" \ --token "${token}" + util::tools::libpak-tools::install \ + --directory "${BUILDPACKDIR}/.bin" + + util::tools::create-package::install \ + --directory "${BUILDPACKDIR}/.bin" + if [[ -f "${BUILDPACKDIR}/.libbuildpack" ]]; then util::tools::packager::install \ --directory "${BUILDPACKDIR}/.bin" From c2bafefacf3330f216552e5837b1d179e918511c Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Sun, 29 Jun 2025 13:37:13 +0000 Subject: [PATCH 29/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index d749eda..ea7a301 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -2,5 +2,5 @@ "createpackage": "v1.73.0", "jam": "v2.11.5", "libpaktools": "v0.2.0", - "pack": "v0.38.1" + "pack": "v0.38.2" } From 7c75887bac026665ad6b209f0479b7c1d9825b41 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Tue, 8 Jul 2025 13:41:59 +0000 Subject: [PATCH 30/41] Updating github-config --- .github/workflows/approve-bot-pr.yml | 4 ++-- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/create-draft-release.yml | 8 ++++---- .github/workflows/label-pr.yml | 2 +- .github/workflows/lint-yaml.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/publish-releases.yml | 4 ++-- .github/workflows/push-buildpackage.yml | 4 ++-- .github/workflows/synchronize-labels.yml | 2 +- .github/workflows/test-pull-request.yml | 8 ++++---- .github/workflows/update-github-config.yml | 4 ++-- .github/workflows/update-go-mod-version.yml | 2 +- 12 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/approve-bot-pr.yml b/.github/workflows/approve-bot-pr.yml index c798e64..8dca7fe 100644 --- a/.github/workflows/approve-bot-pr.yml +++ b/.github/workflows/approve-bot-pr.yml @@ -10,7 +10,7 @@ jobs: download: name: Download PR Artifact if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 outputs: pr-author: ${{ steps.pr-data.outputs.author }} pr-number: ${{ steps.pr-data.outputs.number }} @@ -32,7 +32,7 @@ jobs: name: Approve Bot PRs needs: download if: ${{ needs.download.outputs.pr-author == 'paketo-bot' || needs.download.outputs.pr-author == 'dependabot[bot]' }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Check Commit Verification id: unverified-commits diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 09253a6..42f8385 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -11,7 +11,7 @@ on: jobs: analyze: name: Analyze - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false diff --git a/.github/workflows/create-draft-release.yml b/.github/workflows/create-draft-release.yml index acc723e..177f4a0 100644 --- a/.github/workflows/create-draft-release.yml +++ b/.github/workflows/create-draft-release.yml @@ -17,7 +17,7 @@ concurrency: release jobs: unit: name: Unit Tests - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 outputs: builders: ${{ steps.builders.outputs.builders }} steps: @@ -39,7 +39,7 @@ jobs: integration: name: Integration Tests - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 needs: unit strategy: matrix: @@ -59,7 +59,7 @@ jobs: release: name: Release - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 needs: integration steps: - name: Setup Go @@ -144,7 +144,7 @@ jobs: failure: name: Alert on Failure - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 needs: [ unit, integration, release ] if: ${{ always() && needs.unit.result == 'failure' || needs.integration.result == 'failure' || needs.release.result == 'failure' }} steps: diff --git a/.github/workflows/label-pr.yml b/.github/workflows/label-pr.yml index b09cdf0..eeb5423 100644 --- a/.github/workflows/label-pr.yml +++ b/.github/workflows/label-pr.yml @@ -15,7 +15,7 @@ concurrency: pr_labels_${{ github.event.number }} jobs: autolabel: name: Ensure Minimal Semver Labels - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Check Minimal Semver Labels uses: mheap/github-action-required-labels@v3 diff --git a/.github/workflows/lint-yaml.yml b/.github/workflows/lint-yaml.yml index e6f4a8b..538d1e6 100644 --- a/.github/workflows/lint-yaml.yml +++ b/.github/workflows/lint-yaml.yml @@ -8,7 +8,7 @@ on: jobs: lintYaml: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d100818..42de66b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,7 +11,7 @@ on: jobs: golangci: name: lint - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Setup Go uses: actions/setup-go@v3 diff --git a/.github/workflows/publish-releases.yml b/.github/workflows/publish-releases.yml index 495341a..a1ffa05 100644 --- a/.github/workflows/publish-releases.yml +++ b/.github/workflows/publish-releases.yml @@ -11,7 +11,7 @@ concurrency: jobs: publish: name: Publish - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Publish Draft Release With Highest Semantic Version id: drafts @@ -23,7 +23,7 @@ jobs: failure: name: Alert on Failure - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 needs: [ publish ] if: ${{ always() && needs.publish.result == 'failure' }} steps: diff --git a/.github/workflows/push-buildpackage.yml b/.github/workflows/push-buildpackage.yml index c2f5a39..68589c9 100644 --- a/.github/workflows/push-buildpackage.yml +++ b/.github/workflows/push-buildpackage.yml @@ -10,7 +10,7 @@ env: jobs: push: name: Push - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout @@ -103,7 +103,7 @@ jobs: failure: name: Alert on Failure - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 needs: [push] if: ${{ always() && needs.push.result == 'failure' }} steps: diff --git a/.github/workflows/synchronize-labels.yml b/.github/workflows/synchronize-labels.yml index 3aaa017..105a32b 100644 --- a/.github/workflows/synchronize-labels.yml +++ b/.github/workflows/synchronize-labels.yml @@ -10,7 +10,7 @@ jobs: synchronize: name: Synchronize Labels runs-on: - - ubuntu-22.04 + - ubuntu-24.04 steps: - uses: actions/checkout@v3 - uses: micnncim/action-label-syncer@v1 diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index cd25980..b186be2 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -13,7 +13,7 @@ concurrency: jobs: unit: name: Unit Tests - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 outputs: builders: ${{ steps.builders.outputs.builders }} steps: @@ -41,7 +41,7 @@ jobs: integration: name: Integration Tests with Builders - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 needs: unit strategy: matrix: @@ -64,7 +64,7 @@ jobs: roundup: name: Integration Tests if: ${{ always() }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 needs: integration steps: - run: | @@ -79,7 +79,7 @@ jobs: upload: name: Upload Workflow Event Payload - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Upload Artifact uses: actions/upload-artifact@v4 diff --git a/.github/workflows/update-github-config.yml b/.github/workflows/update-github-config.yml index 79164ac..a3d7917 100644 --- a/.github/workflows/update-github-config.yml +++ b/.github/workflows/update-github-config.yml @@ -10,7 +10,7 @@ concurrency: github_config_update jobs: build: name: Create PR to update shared files - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout @@ -63,7 +63,7 @@ jobs: failure: name: Alert on Failure - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 needs: [build] if: ${{ always() && needs.build.result == 'failure' }} steps: diff --git a/.github/workflows/update-go-mod-version.yml b/.github/workflows/update-go-mod-version.yml index b68db8a..dc6a2d6 100644 --- a/.github/workflows/update-go-mod-version.yml +++ b/.github/workflows/update-go-mod-version.yml @@ -75,7 +75,7 @@ jobs: failure: name: Alert on Failure - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 needs: [update-go] if: ${{ always() && needs.update-go.result == 'failure' }} steps: From 1413cc2b7b7379bbaef570ffb40997171e7365b0 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Tue, 15 Jul 2025 13:42:07 +0000 Subject: [PATCH 31/41] Updating github-config --- .github/workflows/approve-bot-pr.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/create-draft-release.yml | 6 +++--- .github/workflows/lint-yaml.yml | 4 ++-- .github/workflows/lint.yml | 2 +- .github/workflows/synchronize-labels.yml | 2 +- .github/workflows/test-pull-request.yml | 4 ++-- .github/workflows/update-github-config.yml | 4 ++-- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/approve-bot-pr.yml b/.github/workflows/approve-bot-pr.yml index 8dca7fe..3e3df20 100644 --- a/.github/workflows/approve-bot-pr.yml +++ b/.github/workflows/approve-bot-pr.yml @@ -52,7 +52,7 @@ jobs: - name: Checkout if: steps.human-commits.outputs.human_commits == 'false' && steps.unverified-commits.outputs.unverified_commits == 'false' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Approve if: steps.human-commits.outputs.human_commits == 'false' && steps.unverified-commits.outputs.unverified_commits == 'false' diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 42f8385..d69118a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/create-draft-release.yml b/.github/workflows/create-draft-release.yml index 177f4a0..379acca 100644 --- a/.github/workflows/create-draft-release.yml +++ b/.github/workflows/create-draft-release.yml @@ -26,7 +26,7 @@ jobs: with: go-version: 'stable' - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run Unit Tests run: ./scripts/unit.sh - name: Get builders from integration.json @@ -51,7 +51,7 @@ jobs: with: go-version: 'stable' - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run Integration Tests run: ./scripts/integration.sh --builder ${{ matrix.builder }} --token ${{ github.token }} env: @@ -68,7 +68,7 @@ jobs: go-version: 'stable' - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-tags: true diff --git a/.github/workflows/lint-yaml.yml b/.github/workflows/lint-yaml.yml index 538d1e6..9094b28 100644 --- a/.github/workflows/lint-yaml.yml +++ b/.github/workflows/lint-yaml.yml @@ -10,10 +10,10 @@ jobs: lintYaml: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Checkout github-config - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: paketo-buildpacks/github-config path: github-config diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 42de66b..6922b4b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,7 +19,7 @@ jobs: go-version: 'stable' - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: golangci-lint uses: golangci/golangci-lint-action@v3 diff --git a/.github/workflows/synchronize-labels.yml b/.github/workflows/synchronize-labels.yml index 105a32b..82f97f9 100644 --- a/.github/workflows/synchronize-labels.yml +++ b/.github/workflows/synchronize-labels.yml @@ -12,7 +12,7 @@ jobs: runs-on: - ubuntu-24.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: micnncim/action-label-syncer@v1 env: GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index b186be2..de2ccd4 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -23,7 +23,7 @@ jobs: go-version: 'stable' - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run Unit Tests env: @@ -54,7 +54,7 @@ jobs: go-version: 'stable' - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run Integration Tests run: ./scripts/integration.sh --builder ${{ matrix.builder }} --token ${{ github.token }} diff --git a/.github/workflows/update-github-config.yml b/.github/workflows/update-github-config.yml index a3d7917..ca19544 100644 --- a/.github/workflows/update-github-config.yml +++ b/.github/workflows/update-github-config.yml @@ -14,12 +14,12 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} - name: Checkout github-config - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: paketo-buildpacks/github-config path: github-config From d1a4d8de06dfceb59327894e98f1ca78167dd156 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Fri, 18 Jul 2025 13:42:02 +0000 Subject: [PATCH 32/41] Updating github-config --- .github/workflows/codeql-analysis.yml | 6 +++--- .github/workflows/create-draft-release.yml | 6 +++--- .github/workflows/label-pr.yml | 2 +- .github/workflows/lint-yaml.yml | 2 +- .github/workflows/lint.yml | 4 ++-- .github/workflows/test-pull-request.yml | 4 ++-- scripts/.util/tools.json | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d69118a..817f062 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -24,12 +24,12 @@ jobs: uses: actions/checkout@v4 - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/create-draft-release.yml b/.github/workflows/create-draft-release.yml index 379acca..d02ce5b 100644 --- a/.github/workflows/create-draft-release.yml +++ b/.github/workflows/create-draft-release.yml @@ -22,7 +22,7 @@ jobs: builders: ${{ steps.builders.outputs.builders }} steps: - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 'stable' - name: Checkout @@ -47,7 +47,7 @@ jobs: fail-fast: false # don't cancel all test jobs when one fails steps: - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 'stable' - name: Checkout @@ -63,7 +63,7 @@ jobs: needs: integration steps: - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 'stable' diff --git a/.github/workflows/label-pr.yml b/.github/workflows/label-pr.yml index eeb5423..55f6850 100644 --- a/.github/workflows/label-pr.yml +++ b/.github/workflows/label-pr.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-24.04 steps: - name: Check Minimal Semver Labels - uses: mheap/github-action-required-labels@v3 + uses: mheap/github-action-required-labels@v5 with: count: 1 labels: semver:major, semver:minor, semver:patch diff --git a/.github/workflows/lint-yaml.yml b/.github/workflows/lint-yaml.yml index 9094b28..930add1 100644 --- a/.github/workflows/lint-yaml.yml +++ b/.github/workflows/lint-yaml.yml @@ -19,7 +19,7 @@ jobs: path: github-config - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6922b4b..4604be7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-24.04 steps: - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 'stable' @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v4 - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v8 with: version: latest args: --timeout 3m0s diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index de2ccd4..cc0b95f 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -18,7 +18,7 @@ jobs: builders: ${{ steps.builders.outputs.builders }} steps: - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 'stable' @@ -49,7 +49,7 @@ jobs: fail-fast: false # don't cancel all test jobs when one fails steps: - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 'stable' diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index ea7a301..8172be9 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,6 +1,6 @@ { "createpackage": "v1.73.0", - "jam": "v2.11.5", + "jam": "v2.12.0", "libpaktools": "v0.2.0", "pack": "v0.38.2" } From 8aeee11b246d5e02f5f04f150138704d350484a1 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Sat, 19 Jul 2025 13:38:49 +0000 Subject: [PATCH 33/41] Updating github-config --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4604be7..8de78b6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v4 - name: golangci-lint - uses: golangci/golangci-lint-action@v8 + uses: golangci/golangci-lint-action@v3 with: version: latest args: --timeout 3m0s From 2d697cf0af2152b1792c7c444ea49df91911ec37 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Tue, 22 Jul 2025 13:42:38 +0000 Subject: [PATCH 34/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 8172be9..a95996c 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,6 +1,6 @@ { "createpackage": "v1.73.0", "jam": "v2.12.0", - "libpaktools": "v0.2.0", + "libpaktools": "v0.3.0", "pack": "v0.38.2" } From c2a7820786f08d801d5613e44ae9fa44bf3a22f5 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Wed, 30 Jul 2025 13:43:10 +0000 Subject: [PATCH 35/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index a95996c..8836edb 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,6 +1,6 @@ { "createpackage": "v1.73.0", - "jam": "v2.12.0", + "jam": "v2.12.1", "libpaktools": "v0.3.0", "pack": "v0.38.2" } From 1701f0481f7e6e3ac1cc672cf2112dbc14fa89c6 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Wed, 13 Aug 2025 13:41:31 +0000 Subject: [PATCH 36/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 8836edb..9b197de 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,6 +1,6 @@ { "createpackage": "v1.73.0", - "jam": "v2.12.1", + "jam": "v2.13.0", "libpaktools": "v0.3.0", "pack": "v0.38.2" } From 25e4f71e2538f437e79e08f8bf76ed47e86ada18 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Thu, 14 Aug 2025 13:41:39 +0000 Subject: [PATCH 37/41] Updating github-config --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/create-draft-release.yml | 22 ++++++++++----------- .github/workflows/lint.yml | 8 ++++---- .github/workflows/test-pull-request.yml | 16 +++++++-------- .github/workflows/update-github-config.yml | 2 +- .github/workflows/update-go-mod-version.yml | 2 +- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 817f062..f916360 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -6,7 +6,7 @@ on: pull_request: branches: [ main ] schedule: - - cron: '34 5 * * *' # daily at 5:34am UTC + - cron: '34 5 * * *' # daily at 5:34am UTC jobs: analyze: diff --git a/.github/workflows/create-draft-release.yml b/.github/workflows/create-draft-release.yml index d02ce5b..01b58cc 100644 --- a/.github/workflows/create-draft-release.yml +++ b/.github/workflows/create-draft-release.yml @@ -21,12 +21,12 @@ jobs: outputs: builders: ${{ steps.builders.outputs.builders }} steps: + - name: Checkout + uses: actions/checkout@v4 - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 'stable' - - name: Checkout - uses: actions/checkout@v4 + go-version-file: go.mod - name: Run Unit Tests run: ./scripts/unit.sh - name: Get builders from integration.json @@ -46,12 +46,12 @@ jobs: builder: ${{ fromJSON(needs.unit.outputs.builders) }} fail-fast: false # don't cancel all test jobs when one fails steps: + - name: Checkout + uses: actions/checkout@v4 - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 'stable' - - name: Checkout - uses: actions/checkout@v4 + go-version-file: go.mod - name: Run Integration Tests run: ./scripts/integration.sh --builder ${{ matrix.builder }} --token ${{ github.token }} env: @@ -62,16 +62,16 @@ jobs: runs-on: ubuntu-24.04 needs: integration steps: - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: 'stable' - - name: Checkout uses: actions/checkout@v4 with: fetch-tags: true + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + - name: Reset Draft Release id: reset uses: paketo-buildpacks/github-config/actions/release/reset-draft@main diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8de78b6..5db0a35 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,13 +13,13 @@ jobs: name: lint runs-on: ubuntu-24.04 steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 'stable' - - - name: Checkout - uses: actions/checkout@v4 + go-version-file: go.mod - name: golangci-lint uses: golangci/golangci-lint-action@v3 diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index cc0b95f..383024a 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -17,13 +17,13 @@ jobs: outputs: builders: ${{ steps.builders.outputs.builders }} steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 'stable' - - - name: Checkout - uses: actions/checkout@v4 + go-version-file: go.mod - name: Run Unit Tests env: @@ -48,13 +48,13 @@ jobs: builder: ${{ fromJSON(needs.unit.outputs.builders) }} fail-fast: false # don't cancel all test jobs when one fails steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 'stable' - - - name: Checkout - uses: actions/checkout@v4 + go-version-file: go.mod - name: Run Integration Tests run: ./scripts/integration.sh --builder ${{ matrix.builder }} --token ${{ github.token }} diff --git a/.github/workflows/update-github-config.yml b/.github/workflows/update-github-config.yml index ca19544..a24481e 100644 --- a/.github/workflows/update-github-config.yml +++ b/.github/workflows/update-github-config.yml @@ -2,7 +2,7 @@ name: Update shared github-config on: schedule: - - cron: '27 13 * * *' # daily at 13:27 UTC + - cron: '27 13 * * *' # daily at 13:27 UTC workflow_dispatch: {} concurrency: github_config_update diff --git a/.github/workflows/update-go-mod-version.yml b/.github/workflows/update-go-mod-version.yml index dc6a2d6..aff9d1e 100644 --- a/.github/workflows/update-go-mod-version.yml +++ b/.github/workflows/update-go-mod-version.yml @@ -22,7 +22,7 @@ jobs: id: setup-go uses: actions/setup-go@v5 with: - go-version: 'stable' + go-version-file: go.mod - name: Get current go toolchain version id: current-go-version uses: paketo-buildpacks/github-config/actions/update-go-mod-version@main From babb076253449ccc867d12b843cbf6c899c0d4af Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Sat, 16 Aug 2025 13:36:14 +0000 Subject: [PATCH 38/41] Updating github-config --- .github/workflows/compile-dependency.yml | 106 +++++++++++++++ .github/workflows/create-draft-release.yml | 95 ++++++++++++-- .github/workflows/push-buildpackage.yml | 105 +++++++++++---- scripts/build.sh | 105 ++++++++++----- scripts/package.sh | 29 ++--- scripts/publish.sh | 142 +++++++++++++++++++++ 6 files changed, 489 insertions(+), 93 deletions(-) create mode 100644 .github/workflows/compile-dependency.yml create mode 100755 scripts/publish.sh diff --git a/.github/workflows/compile-dependency.yml b/.github/workflows/compile-dependency.yml new file mode 100644 index 0000000..17e00fd --- /dev/null +++ b/.github/workflows/compile-dependency.yml @@ -0,0 +1,106 @@ +name: 'Compile Dependency on Target - Reusable Workflow' + +description: | + Compiles Dependency on given target, os, and arch + +on: + workflow_call: + inputs: + version: + description: 'dependency version' + required: true + type: string + target: + description: 'dependency OS target variant' + required: true + type: string + os: + description: 'platform OS (e.g., linux)' + required: true + type: string + arch: + description: 'platform architecture (e.g., amd64)' + required: true + type: string + shouldCompile: + description: 'whether to compile the dependency' + required: true + type: boolean + shouldTest: + description: 'whether to test the dependency after compilation' + required: true + type: boolean + uploadArtifactName: + description: 'name of the artifact to upload' + required: true + type: string + +jobs: + compile: + # Speed up compilation by using runners that match os and arch when they are set, otherwise fall back to emulation. + runs-on: ${{ (inputs.os == 'linux' && inputs.arch == 'arm64') && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }} + + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Enable experimental features for Docker daemon and CLI + run: | + echo '{"experimental": true}' | sudo tee /etc/docker/daemon.json + sudo systemctl restart docker + mkdir -p ~/.docker + echo '{"experimental": "enabled"}' | sudo tee ~/.docker/config.json + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Setup before compilation + id: compile-setup + run: | + echo "outputdir=$(mktemp -d)" >> "$GITHUB_OUTPUT" + + - name: docker build + id: docker-build + env: + SKIP_LOGIN: true + if: ${{ inputs.shouldCompile == true || inputs.shouldCompile == 'true' }} + uses: actions-hub/docker/cli@master + with: + args: "build ${{ (inputs.os != '' && inputs.arch != '') && format('--platform {0}/{1}', inputs.os, inputs.arch) || '' }} -t compilation -f dependency/actions/compile/${{ inputs.target }}.Dockerfile dependency/actions/compile" + + - name: docker run + id: docker-run + uses: actions-hub/docker/cli@master + env: + SKIP_LOGIN: true + if: ${{ inputs.shouldCompile == true || inputs.shouldCompile == 'true' }} + with: + args: "run ${{ (inputs.os != '' && inputs.arch != '') && format('--platform {0}/{1}', inputs.os, inputs.arch) || '' }} -v ${{ steps.compile-setup.outputs.outputdir }}:/home compilation --outputDir /home --target ${{ inputs.target }} --version ${{ inputs.version }} ${{ inputs.os != '' && format('--os {0}', inputs.os) || '' }} ${{ inputs.arch != '' && format('--arch {0}', inputs.arch) || '' }}" + + - name: Print contents of output dir + shell: bash + run: ls -lah ${{ steps.compile-setup.outputs.outputdir }} + + - name: Test Dependency + working-directory: dependency + if: ${{ (inputs.shouldCompile == true || inputs.shouldCompile == 'true') && (inputs.shouldTest == true || inputs.shouldTest == 'true') }} + run: | + #!/usr/bin/env bash + set -euo pipefail + shopt -s inherit_errexit + + make test \ + version="${{ inputs.version }}" \ + tarballPath="${{ steps.compile-setup.outputs.outputdir }}/*.tgz" \ + os="${{ inputs.os }}" \ + arch="${{ inputs.arch }}" + + - name: Upload compiled artifact + uses: actions/upload-artifact@v4 + if: ${{ inputs.shouldCompile == true || inputs.shouldCompile == 'true' }} + with: + name: '${{ inputs.uploadArtifactName }}' + path: '${{ steps.compile-setup.outputs.outputdir }}/*' diff --git a/.github/workflows/create-draft-release.yml b/.github/workflows/create-draft-release.yml index 01b58cc..9f94088 100644 --- a/.github/workflows/create-draft-release.yml +++ b/.github/workflows/create-draft-release.yml @@ -61,6 +61,12 @@ jobs: name: Release runs-on: ubuntu-24.04 needs: integration + services: + registry: + image: registry:2 + ports: + - 5000:5000 + steps: - name: Checkout uses: actions/checkout@v4 @@ -110,6 +116,16 @@ jobs: echo "buildpack_type=buildpack" >> "$GITHUB_OUTPUT" fi + - name: Get buildpack path + id: get_buildpack_path + run: | + + if [ -f "build/buildpackage.cnb" ]; then + echo "path=build/buildpackage.cnb" >> "$GITHUB_OUTPUT" + else + echo "path=build/buildpackage-linux-amd64.cnb" >> "$GITHUB_OUTPUT" + fi + - name: Create Release Notes id: create-release-notes uses: paketo-buildpacks/github-config/actions/release/notes@main @@ -117,6 +133,69 @@ jobs: repo: ${{ github.repository }} token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} buildpack_type: ${{ steps.get_buildpack_type.outputs.buildpack_type }} + buildpackage_path: ${{ steps.get_buildpack_path.outputs.path }} + + - name: Get Image Digest + id: image_digest + run: | + image_name="localhost:5000/npm-install:latest" + + ./scripts/publish.sh \ + --buildpack-type ${{ steps.get_buildpack_type.outputs.buildpack_type }} \ + --image-ref $image_name + + echo "digest=$(sudo skopeo inspect "docker://${image_name}" --tls-verify=false | jq -r .Digest)" >> "$GITHUB_OUTPUT" + + - name: Set Correct Image Digest on the Release notes + run: | + printf '${{ steps.create-release-notes.outputs.release_body }}' \ + | sed -E \ + "s/\*\*Digest:\*\* \`sha256:[a-f0-9]{64}\`/\*\*Digest:\*\* \`${{ steps.image_digest.outputs.digest }}\`/" \ + > ./release_notes + + printf '${{ steps.image_digest.outputs.digest }}' > ./index-digest.sha256 + + - name: Create release assets + id: create_release_assets + run: | + release_assets=$(jq -n --arg repo_name "${{ github.event.repository.name }}" --arg tag "${{ steps.tag.outputs.tag }}" ' + [ + { + "path": "build/buildpack.tgz", + "name": ($repo_name + "-" + $tag + ".tgz"), + "content_type": "application/gzip" + }, + { + "path": "./index-digest.sha256", + "name": ($repo_name + "-" + $tag + "-" + "index-digest.sha256"), + "content_type": "text/plain" + } + ]') + + for filepath in build/*.cnb; do + filename=$(basename "$filepath") + asset_name="" + if [[ "$filename" == "buildpackage-linux-amd64.cnb" ]]; then + asset_name="${{ github.event.repository.name }}-${{ steps.tag.outputs.tag }}.cnb" + elif [[ "$filename" == "buildpackage.cnb" ]]; then + asset_name="${{ github.event.repository.name }}-${{ steps.tag.outputs.tag }}.cnb" + else + formatted_filename="${filename#buildpackage-}" + asset_name="${{ github.event.repository.name }}-${{ steps.tag.outputs.tag }}-${formatted_filename}" + fi + + release_assets=$(echo "$release_assets" | jq --arg asset_name "${asset_name}" --arg filepath "$filepath" ' + . + [ + { + "path": $filepath, + "name": $asset_name, + "content_type": "application/gzip" + } + ]') + done + + release_assets=$(jq -c <<< "$release_assets" ) + printf "release_assets=%s\n" "${release_assets}" >> "$GITHUB_OUTPUT" - name: Create Release uses: paketo-buildpacks/github-config/actions/release/create@main @@ -126,21 +205,9 @@ jobs: tag_name: v${{ steps.tag.outputs.tag }} target_commitish: ${{ github.sha }} name: v${{ steps.tag.outputs.tag }} - body: ${{ steps.create-release-notes.outputs.release_body }} + body_filepath: "./release_notes" draft: true - assets: | - [ - { - "path": "build/buildpack.tgz", - "name": "${{ github.event.repository.name }}-${{ steps.tag.outputs.tag }}.tgz", - "content_type": "application/gzip" - }, - { - "path": "build/buildpackage.cnb", - "name": "${{ github.event.repository.name }}-${{ steps.tag.outputs.tag }}.cnb", - "content_type": "application/gzip" - } - ] + assets: ${{ steps.create_release_assets.outputs.release_assets }} failure: name: Alert on Failure diff --git a/.github/workflows/push-buildpackage.yml b/.github/workflows/push-buildpackage.yml index 68589c9..8d97a5c 100644 --- a/.github/workflows/push-buildpackage.yml +++ b/.github/workflows/push-buildpackage.yml @@ -4,6 +4,7 @@ on: release: types: - published + env: REGISTRIES_FILENAME: "registries.json" @@ -11,6 +12,14 @@ jobs: push: name: Push runs-on: ubuntu-24.04 + env: + GCR_REGISTRY: "gcr.io" + GCR_PASSWORD: ${{ secrets.GCR_PUSH_BOT_JSON_KEY }} + GCR_USERNAME: "_json_key" + DOCKERHUB_REGISTRY: docker.io + DOCKERHUB_USERNAME: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_PASSWORD }} + steps: - name: Checkout @@ -25,16 +34,31 @@ jobs: echo "tag_full=${FULL_VERSION}" >> "$GITHUB_OUTPUT" echo "tag_minor=${MINOR_VERSION}" >> "$GITHUB_OUTPUT" echo "tag_major=${MAJOR_VERSION}" >> "$GITHUB_OUTPUT" - echo "download_url=$(jq -r '.release.assets[] | select(.name | endswith(".cnb")) | .url' "${GITHUB_EVENT_PATH}")" >> "$GITHUB_OUTPUT" + echo "download_tgz_file_url=$(jq -r '.release.assets[] | select(.name | endswith(".tgz")) | .url' "${GITHUB_EVENT_PATH}")" >> "$GITHUB_OUTPUT" + echo "download_cnb_file_url=$(jq -r --arg tag_full "$FULL_VERSION" '.release.assets[] | select(.name | endswith($tag_full + ".cnb")) | .url' "${GITHUB_EVENT_PATH}")" >> "$GITHUB_OUTPUT" + echo "download_sha256_file_url=$(jq -r '.release.assets[] | select(.name | endswith("index-digest.sha256")) | .url' "${GITHUB_EVENT_PATH}")" >> "$GITHUB_OUTPUT" - - name: Download - id: download + - name: Download .cnb buildpack uses: paketo-buildpacks/github-config/actions/release/download-asset@main with: - url: ${{ steps.event.outputs.download_url }} + url: ${{ steps.event.outputs.download_cnb_file_url }} output: "/github/workspace/buildpackage.cnb" token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} + - name: Download .tgz buildpack + uses: paketo-buildpacks/github-config/actions/release/download-asset@main + with: + url: ${{ steps.event.outputs.download_tgz_file_url }} + output: "/github/workspace/buildpack.tgz" + token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} + + - name: Download .sha digest + uses: paketo-buildpacks/github-config/actions/release/download-asset@main + with: + url: ${{ steps.event.outputs.download_sha256_file_url }} + output: "/github/workspace/index-digest.sha256" + token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} + - name: Parse Configs id: parse_configs run: | @@ -64,41 +88,74 @@ jobs: exit 1 fi - - name: Push to GCR - if: ${{ steps.parse_configs.outputs.push_to_gcr == 'true' }} - env: - GCR_PUSH_BOT_JSON_KEY: ${{ secrets.GCR_PUSH_BOT_JSON_KEY }} + - name: Get buildpack type + id: get_buildpack_type run: | - echo "${GCR_PUSH_BOT_JSON_KEY}" | sudo skopeo login --username _json_key --password-stdin gcr.io - sudo skopeo copy "oci-archive:${GITHUB_WORKSPACE}/buildpackage.cnb" "docker://gcr.io/${{ github.repository }}:${{ steps.event.outputs.tag_full }}" - sudo skopeo copy "oci-archive:${GITHUB_WORKSPACE}/buildpackage.cnb" "docker://gcr.io/${{ github.repository }}:${{ steps.event.outputs.tag_minor }}" - sudo skopeo copy "oci-archive:${GITHUB_WORKSPACE}/buildpackage.cnb" "docker://gcr.io/${{ github.repository }}:${{ steps.event.outputs.tag_major }}" - sudo skopeo copy "oci-archive:${GITHUB_WORKSPACE}/buildpackage.cnb" "docker://gcr.io/${{ github.repository }}:latest" + if [ -f "extension.toml" ]; then + echo "buildpack_type=extension" >> "$GITHUB_OUTPUT" + else + echo "buildpack_type=buildpack" >> "$GITHUB_OUTPUT" + fi + + - name: Docker login docker.io + uses: docker/login-action@v3 + with: + username: ${{ env.DOCKERHUB_USERNAME }} + password: ${{ env.DOCKERHUB_PASSWORD }} + registry: ${{ env.DOCKERHUB_REGISTRY }} + + - name: Docker login gcr.io + uses: docker/login-action@v3 + if: ${{ steps.parse_configs.outputs.push_to_gcr == 'true' }} + with: + username: ${{ env.GCR_USERNAME }} + password: ${{ env.GCR_PASSWORD }} + registry: ${{ env.GCR_REGISTRY }} - name: Push to DockerHub if: ${{ steps.parse_configs.outputs.push_to_dockerhub == 'true' }} id: push env: - DOCKERHUB_USERNAME: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_USERNAME }} - DOCKERHUB_PASSWORD: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_PASSWORD }} GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }} run: | - REPOSITORY="${GITHUB_REPOSITORY_OWNER/-/}/${GITHUB_REPOSITORY#${GITHUB_REPOSITORY_OWNER}/}" # translates 'paketo-buildpacks/bundle-install' to 'paketobuildpacks/bundle-install' - IMAGE="index.docker.io/${REPOSITORY}" - echo "${DOCKERHUB_PASSWORD}" | sudo skopeo login --username "${DOCKERHUB_USERNAME}" --password-stdin index.docker.io - sudo skopeo copy "oci-archive:${GITHUB_WORKSPACE}/buildpackage.cnb" "docker://${IMAGE}:${{ steps.event.outputs.tag_full }}" - sudo skopeo copy "oci-archive:${GITHUB_WORKSPACE}/buildpackage.cnb" "docker://${IMAGE}:${{ steps.event.outputs.tag_minor }}" - sudo skopeo copy "oci-archive:${GITHUB_WORKSPACE}/buildpackage.cnb" "docker://${IMAGE}:${{ steps.event.outputs.tag_major }}" - sudo skopeo copy "oci-archive:${GITHUB_WORKSPACE}/buildpackage.cnb" "docker://${IMAGE}:latest" + IMAGE="${GITHUB_REPOSITORY_OWNER/-/}/${GITHUB_REPOSITORY#${GITHUB_REPOSITORY_OWNER}/}" # translates 'paketo-buildpacks/bundle-install' to 'paketobuildpacks/bundle-install' + echo "${DOCKERHUB_PASSWORD}" | sudo skopeo login --username "${DOCKERHUB_USERNAME}" --password-stdin ${DOCKERHUB_REGISTRY} + + ./scripts/publish.sh \ + --archive-path ./buildpack.tgz \ + --buildpack-type ${{ steps.get_buildpack_type.outputs.buildpack_type }} \ + --image-ref "${DOCKERHUB_REGISTRY}/${IMAGE}:${{ steps.event.outputs.tag_full }}" + + ## Validate that the digest pushed to registry matches with the one mentioned on the readme file + pushed_image_index_digest=$(sudo skopeo inspect "docker://${DOCKERHUB_REGISTRY}/${IMAGE}:${{ steps.event.outputs.tag_full }}" | jq -r .Digest) + + if [ "$(cat ./index-digest.sha256)" != "$pushed_image_index_digest" ]; then + echo "Image index digest pushed to registry does not match with the one mentioned on the readme file" + exit 1; + fi + + sudo skopeo copy "docker://${DOCKERHUB_REGISTRY}/${IMAGE}:${{ steps.event.outputs.tag_full }}" "docker://${DOCKERHUB_REGISTRY}/${IMAGE}:${{ steps.event.outputs.tag_minor }}" --multi-arch all + sudo skopeo copy "docker://${DOCKERHUB_REGISTRY}/${IMAGE}:${{ steps.event.outputs.tag_full }}" "docker://${DOCKERHUB_REGISTRY}/${IMAGE}:${{ steps.event.outputs.tag_major }}" --multi-arch all + sudo skopeo copy "docker://${DOCKERHUB_REGISTRY}/${IMAGE}:${{ steps.event.outputs.tag_full }}" "docker://${DOCKERHUB_REGISTRY}/${IMAGE}:latest" --multi-arch all echo "image=${IMAGE}" >> "$GITHUB_OUTPUT" - echo "digest=$(sudo skopeo inspect "oci-archive:${GITHUB_WORKSPACE}/buildpackage.cnb" | jq -r .Digest)" >> "$GITHUB_OUTPUT" + echo "digest=$pushed_image_index_digest" >> "$GITHUB_OUTPUT" + + - name: Push to GCR + if: ${{ steps.parse_configs.outputs.push_to_gcr == 'true' }} + run: | + echo "${GCR_PASSWORD}" | sudo skopeo login --username "${GCR_USERNAME}" --password-stdin "${GCR_REGISTRY}" + + sudo skopeo copy "docker://${DOCKERHUB_REGISTRY}/${{ steps.push.outputs.image }}" "docker://${GCR_REGISTRY}/${{ github.repository }}:${{ steps.event.outputs.tag_full }}" --multi-arch all + sudo skopeo copy "docker://${DOCKERHUB_REGISTRY}/${{ steps.push.outputs.image }}" "docker://${GCR_REGISTRY}/${{ github.repository }}:${{ steps.event.outputs.tag_minor }}" --multi-arch all + sudo skopeo copy "docker://${DOCKERHUB_REGISTRY}/${{ steps.push.outputs.image }}" "docker://${GCR_REGISTRY}/${{ github.repository }}:${{ steps.event.outputs.tag_major }}" --multi-arch all + sudo skopeo copy "docker://${DOCKERHUB_REGISTRY}/${{ steps.push.outputs.image }}" "docker://${GCR_REGISTRY}/${{ github.repository }}:latest" --multi-arch all - name: Register with CNB Registry uses: docker://ghcr.io/buildpacks/actions/registry/request-add-entry:main with: id: ${{ github.repository }} version: ${{ steps.event.outputs.tag_full }} - address: ${{ steps.push.outputs.image }}@${{ steps.push.outputs.digest }} + address: index.docker.io/${{ steps.push.outputs.image }}@${{ steps.push.outputs.digest }} token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} failure: diff --git a/scripts/build.sh b/scripts/build.sh index c6e1413..11ab80b 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -3,10 +3,15 @@ set -eu set -o pipefail +readonly ROOT_DIR="$(cd "$(dirname "${0}")/.." && pwd)" readonly PROGDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" readonly BUILDPACKDIR="$(cd "${PROGDIR}/.." && pwd)" +# shellcheck source=SCRIPTDIR/.util/print.sh +source "${ROOT_DIR}/scripts/.util/print.sh" + function main() { + local targets=() while [[ "${#}" != 0 ]]; do case "${1}" in --help|-h) @@ -15,6 +20,11 @@ function main() { exit 0 ;; + --target) + targets+=("${2}") + shift 2 + ;; + "") # skip if the argument is empty shift 1 @@ -27,8 +37,18 @@ function main() { mkdir -p "${BUILDPACKDIR}/bin" + if [[ ${#targets[@]} -eq 0 ]]; then + targets=("linux/amd64") + util::print::info "Setting default target platform architecture to: linux/amd64" + fi + run::build cmd::build + + ## For backwards compatibility with amd64 wokflows + if [[ ${#targets[@]} -eq 1 && "${targets[0]}" == "linux/amd64" ]]; then + cp -r "${BUILDPACKDIR}/linux/amd64/bin/" "${BUILDPACKDIR}/" + fi } function usage() { @@ -38,39 +58,49 @@ build.sh [OPTIONS] Builds the buildpack executables. OPTIONS - --help -h prints the command usage + --target strings Target platforms to build for. + Targets should be in the format '[os][/arch][/variant]'. + - To specify two different architectures: '--target "linux/amd64" --target "linux/arm64"' + --help -h prints the command usage USAGE } function run::build() { if [[ -f "${BUILDPACKDIR}/run/main.go" ]]; then - pushd "${BUILDPACKDIR}/bin" > /dev/null || return - printf "%s" "Building run... " + pushd "${BUILDPACKDIR}" > /dev/null || return + for target in "${targets[@]}"; do + platform=$(echo "${target}" | cut -d '/' -f1) + arch=$(echo "${target}" | cut -d'/' -f2) - GOOS=linux \ - CGO_ENABLED=0 \ - go build \ - -ldflags="-s -w" \ - -o "run" \ - "${BUILDPACKDIR}/run" + util::print::title "Building run... for platform: ${platform} and arch: ${arch}" - echo "Success!" + GOOS=$platform \ + GOARCH=$arch \ + CGO_ENABLED=0 \ + go build \ + -ldflags="-s -w" \ + -o "${platform}/${arch}/bin/run" \ + "${BUILDPACKDIR}/run" - names=("detect") + echo "Success!" - if [ -f "${BUILDPACKDIR}/extension.toml" ]; then - names+=("generate") - else - names+=("build") - fi + names=("detect") - for name in "${names[@]}"; do - printf "%s" "Linking ${name}... " + if [ -f "${BUILDPACKDIR}/extension.toml" ]; then + names+=("generate") + else + names+=("build") + fi - ln -sf "run" "${name}" + for name in "${names[@]}"; do + printf "%s" "Linking ${name}... " - echo "Success!" + ln -fs "run" "${platform}/${arch}/bin/${name}" + + echo "Success!" + done done + popd > /dev/null || return fi } @@ -80,21 +110,26 @@ function cmd::build() { local name for src in "${BUILDPACKDIR}"/cmd/*; do name="$(basename "${src}")" - - if [[ -f "${src}/main.go" ]]; then - printf "%s" "Building ${name}... " - - GOOS="linux" \ - CGO_ENABLED=0 \ - go build \ - -ldflags="-s -w" \ - -o "${BUILDPACKDIR}/bin/${name}" \ - "${src}/main.go" - - echo "Success!" - else - printf "%s" "Skipping ${name}... " - fi + for target in "${targets[@]}"; do + platform=$(echo "${target}" | cut -d '/' -f1) + arch=$(echo "${target}" | cut -d'/' -f2) + + if [[ -f "${src}/main.go" ]]; then + util::print::title "Building ${name}... for platform: ${platform} and arch: ${arch}" + + GOOS=$platform \ + GOARCH=$arch \ + CGO_ENABLED=0 \ + go build \ + -ldflags="-s -w" \ + -o "${BUILDPACKDIR}/${platform}/${arch}/bin/${name}" \ + "${src}/main.go" + + echo "Success!" + else + printf "%s" "Skipping ${name}... " + fi + done done fi } diff --git a/scripts/package.sh b/scripts/package.sh index 916363e..cb79bfd 100755 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -144,26 +144,15 @@ function buildpackage::create() { util::print::title "Packaging ${buildpack_type}... ${output}" - if [ "$buildpack_type" == "extension" ]; then - cwd=$(pwd) - cd ${BUILD_DIR} - mkdir cnbdir - cd cnbdir - cp ../buildpack.tgz . - tar -xvf buildpack.tgz - rm buildpack.tgz - - pack \ - extension package "${output}" \ - --format file - - cd $cwd - else - pack \ - buildpack package "${output}" \ - --path "${BUILD_DIR}/buildpack.tgz" \ - --format file - fi + mkdir ${BUILD_DIR}/cnbdir + tar -xvf ${BUILD_DIR}/buildpack.tgz -C ${BUILD_DIR}/cnbdir + + pack \ + "${buildpack_type}" package "${output}" \ + --path ${BUILD_DIR}/cnbdir \ + --format file + + rm -rf ${BUILD_DIR}/cnbdir } main "${@:-}" \ No newline at end of file diff --git a/scripts/publish.sh b/scripts/publish.sh new file mode 100755 index 0000000..4c2afbc --- /dev/null +++ b/scripts/publish.sh @@ -0,0 +1,142 @@ +#!/usr/bin/env bash + +set -eu +set -o pipefail + +readonly ROOT_DIR="$(cd "$(dirname "${0}")/.." && pwd)" +readonly BIN_DIR="${ROOT_DIR}/.bin" + +# shellcheck source=SCRIPTDIR/.util/tools.sh +source "${ROOT_DIR}/scripts/.util/tools.sh" + +# shellcheck source=SCRIPTDIR/.util/print.sh +source "${ROOT_DIR}/scripts/.util/print.sh" + +function main { + local archive_path buildpack_type image_ref token + token="" + + while [[ "${#}" != 0 ]]; do + case "${1}" in + --archive-path | -a) + archive_path="${2}" + shift 2 + ;; + + --buildpack-type | -bt) + buildpack_type="${2}" + shift 2 + ;; + + --image-ref | -i) + image_ref+=("${2}") + shift 2 + ;; + + --token | -t) + token="${2}" + shift 2 + ;; + + --help | -h) + shift 1 + usage + exit 0 + ;; + + "") + # skip if the argument is empty + shift 1 + ;; + + *) + util::print::error "unknown argument \"${1}\"" + ;; + esac + done + + if [[ -z "${image_ref:-}" ]]; then + usage + util::print::error "--image-ref is required" + fi + + if [[ -z "${buildpack_type:-}" ]]; then + usage + util::print::error "--buildpack-type is required" + fi + + if [[ ${buildpack_type} != "buildpack" && ${buildpack_type} != "extension" ]]; then + usage + util::print::error "--buildpack-type accepted values: [\"buildpack\",\"extension\"]" + fi + + if [[ -z "${archive_path:-}" ]]; then + util::print::info "Using default archive path: ${ROOT_DIR}/build/buildpack.tgz" + archive_path="${ROOT_DIR}/build/buildpack.tgz" + else + archive_path="${archive_path}" + fi + + repo::prepare + + tools::install "${token}" + + buildpack::publish "${image_ref}" "${buildpack_type}" "${archive_path}" +} + +function usage() { + cat <<-USAGE +Publishes a buildpack or an extension in to a registry. + +OPTIONS + -a, --archive-path Path to the buildpack or extension arhive (default: ${ROOT_DIR}/build/buildpack.tgz) (optional) + -h, --help Prints the command usage + -i, --image-ref List of image reference to publish to (required) + -bt --buildpack-type Type of buildpack to publish (accepted values: buildpack, extension) (required) + -t, --token Token used to download assets from GitHub (e.g. jam, pack, etc) (optional) + +USAGE +} + +function repo::prepare() { + util::print::title "Preparing repo..." + + mkdir -p "${BIN_DIR}" + + export PATH="${BIN_DIR}:${PATH}" +} + +function tools::install() { + local token + token="${1}" + + util::tools::pack::install \ + --directory "${BIN_DIR}" \ + --token "${token}" +} + +function buildpack::publish() { + + local image_ref buildpack_type archive_path + image_ref="${1}" + buildpack_type="${2}" + archive_path="${3}" + + util::print::title "Publishing ${buildpack_type}..." + + util::print::info "Extracting archive..." + tmp_dir=$(mktemp -d -p $ROOT_DIR) + tar -xvf $archive_path -C $tmp_dir + + util::print::info "Publishing ${buildpack_type} to ${image_ref}" + + pack \ + ${buildpack_type} package $image_ref \ + --path $tmp_dir \ + --format image \ + --publish + + rm -rf $tmp_dir +} + +main "${@:-}" From 0295f849bb2eee1e2c1ea59607c1d8057454ab73 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Fri, 22 Aug 2025 13:37:49 +0000 Subject: [PATCH 39/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 9b197de..4d02e3f 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,6 +1,6 @@ { "createpackage": "v1.73.0", - "jam": "v2.13.0", + "jam": "v2.14.0", "libpaktools": "v0.3.0", "pack": "v0.38.2" } From ce425f5209de9e052cadb77a8ec22c679cdd12e3 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Sat, 23 Aug 2025 13:34:48 +0000 Subject: [PATCH 40/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index 4d02e3f..d0f6fd9 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,6 +1,6 @@ { "createpackage": "v1.73.0", - "jam": "v2.14.0", + "jam": "v2.14.1", "libpaktools": "v0.3.0", "pack": "v0.38.2" } From 2e58fa4590b3e5180bbb4b81aeca0c812c9f8315 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Sun, 24 Aug 2025 13:35:07 +0000 Subject: [PATCH 41/41] Updating github-config --- scripts/.util/tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index d0f6fd9..aac0728 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,6 +1,6 @@ { "createpackage": "v1.73.0", - "jam": "v2.14.1", + "jam": "v2.14.2", "libpaktools": "v0.3.0", "pack": "v0.38.2" }