From 213cce6cbf38d6a1cca91c396161fbbeee476101 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Thu, 12 Nov 2026 13:31:57 +0000 Subject: [PATCH 1/4] Updating github-config --- .github/.patch_files | 1 + .github/workflows/create-draft-release.yml | 297 +++++++++++++++++- .github/workflows/label-pr.yml | 13 +- .github/workflows/push-buildpackage.yml | 78 +++-- .../update-dependencies-from-metadata.yml | 31 +- scripts/.util/implementation.sh | 101 ++++++ scripts/.util/tools.json | 2 +- scripts/.util/tools.sh | 11 + scripts/package.sh | 71 ++++- 9 files changed, 569 insertions(+), 36 deletions(-) create mode 100644 scripts/.util/implementation.sh diff --git a/.github/.patch_files b/.github/.patch_files index 7980919..5f461bd 100644 --- a/.github/.patch_files +++ b/.github/.patch_files @@ -24,6 +24,7 @@ README.md go.mod go.sum scripts/.util/builders.sh +scripts/.util/implementation.sh scripts/.util/print.sh scripts/.util/tools.json scripts/.util/tools.sh diff --git a/.github/workflows/create-draft-release.yml b/.github/workflows/create-draft-release.yml index b8bca25..06ae2c6 100644 --- a/.github/workflows/create-draft-release.yml +++ b/.github/workflows/create-draft-release.yml @@ -25,6 +25,8 @@ jobs: runs-on: ubuntu-24.04 outputs: builders: ${{ steps.builders.outputs.builders }} + integration: ${{ steps.config.outputs.integration }} + multi: ${{ steps.config.outputs.multi }} steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -36,6 +38,12 @@ jobs: go-version-file: go.mod - name: Run Unit Tests run: ./scripts/unit.sh + - name: Read Implementation Config + id: config + run: | + source "${GITHUB_WORKSPACE}/scripts/.util/implementation.sh" + echo "integration=$(util::implementation::integration "${GITHUB_WORKSPACE}")" >> "$GITHUB_OUTPUT" + echo "multi=$(util::implementation::is_multi "${GITHUB_WORKSPACE}")" >> "$GITHUB_OUTPUT" - name: Get builders from integration.json id: builders run: | @@ -48,6 +56,7 @@ jobs: name: Integration Tests runs-on: ubuntu-24.04 needs: unit + if: ${{ needs.unit.outputs.integration == 'true' }} permissions: contents: read packages: read # pull builder images for integration tests @@ -89,15 +98,17 @@ jobs: TMPDIR: "${{ runner.temp }}" GIT_TOKEN: ${{ github.token }} + # Standard implementation: one buildpack, packaged with jam/pack. release: name: Release runs-on: ubuntu-24.04 - needs: integration + needs: [unit, integration] + if: ${{ needs.unit.outputs.multi != 'true' }} permissions: contents: write # create and update the draft release services: registry: - image: registry:3@sha256:ddf754342cfc8acc51a56d5d0ab6af06826461864460636d8bd5c546dab2a7b8 + image: registry:3@sha256:82f6ff4a7f982960c8aa51617fea3aabc485df6e55cce80d22deb1de36f1bc3c ports: - 5000:5000 @@ -257,11 +268,289 @@ jobs: draft: true assets: ${{ steps.create_release_assets.outputs.release_assets }} + # Multi-implementation: a combined buildpack plus one per component. + release-prep: + name: Release Prep (multi) + runs-on: ubuntu-24.04 + needs: [unit, integration] + if: ${{ always() && needs.unit.outputs.multi == 'true' && needs.unit.result == 'success' && (needs.integration.result == 'success' || needs.integration.result == 'skipped') }} + permissions: + contents: write # reset the draft release + outputs: + tag: ${{ steps.tag.outputs.tag }} + buildpack_type: ${{ steps.get_buildpack_type.outputs.buildpack_type }} + buildpacks: ${{ steps.config.outputs.buildpacks }} + combined: ${{ steps.config.outputs.combined }} + components: ${{ steps.config.outputs.components }} + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + fetch-tags: true + + - name: Setup Go + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + with: + go-version-file: go.mod + + - name: Read Implementation Config + id: config + run: | + source "${GITHUB_WORKSPACE}/scripts/.util/implementation.sh" + echo "buildpacks=$(util::implementation::buildpacks "${GITHUB_WORKSPACE}")" >> "$GITHUB_OUTPUT" + echo "combined=$(util::implementation::combined "${GITHUB_WORKSPACE}")" >> "$GITHUB_OUTPUT" + echo "components=$(util::implementation::components "${GITHUB_WORKSPACE}")" >> "$GITHUB_OUTPUT" + + - 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 + uses: paketo-buildpacks/github-config/actions/tag/calculate-semver@main + with: + repo: ${{ github.repository }} + token: ${{ github.token }} + ref-name: ${{ github.ref_name }} + + - name: Set Release Tag + id: tag + env: + INPUT_VERSION: ${{ github.event.inputs.version }} + SEMVER_TAG: ${{ steps.semver.outputs.tag }} + run: | + tag="${INPUT_VERSION}" + if [ -z "${tag}" ]; then + tag="${SEMVER_TAG}" + fi + echo "tag=${tag}" >> "$GITHUB_OUTPUT" + + - 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: Package + env: + TAG: ${{ steps.tag.outputs.tag }} + run: ./scripts/package.sh --version "${TAG}" + + - name: Upload build artifacts + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: build-artifacts + path: build/ + retention-days: 1 + + generate-notes: + name: Generate Release Notes (${{ matrix.buildpack }}) + runs-on: ubuntu-24.04 + needs: [unit, release-prep] + if: ${{ needs.unit.outputs.multi == 'true' }} + services: + registry: + image: registry:3@sha256:82f6ff4a7f982960c8aa51617fea3aabc485df6e55cce80d22deb1de36f1bc3c + ports: + - 5000:5000 + strategy: + matrix: + buildpack: ${{ fromJSON(needs.release-prep.outputs.buildpacks) }} + fail-fast: false + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Download build artifacts + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 + with: + name: build-artifacts + path: build/ + + # Use the full action for the combined buildpack so the release notes include + # the Changes section (PR list since the last release). + - name: Create Release Notes + id: create-release-notes + if: matrix.buildpack == needs.release-prep.outputs.combined + uses: paketo-buildpacks/github-config/actions/release/notes@main + with: + repo: ${{ github.repository }} + token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} + buildpack_type: ${{ needs.release-prep.outputs.buildpack_type }} + buildpackage_path: build/${{ matrix.buildpack }}.cnb + + - name: Write Release Notes to file + if: matrix.buildpack == needs.release-prep.outputs.combined + env: + RELEASE_BODY: ${{ steps.create-release-notes.outputs.release_body }} + run: | + printf '%s' "${RELEASE_BODY}" > ./release_notes_raw + + # For the component buildpacks, run jam summarize directly. The Changes + # section would be identical for every component and would otherwise be + # duplicated in the final release notes. + - name: Summarize Component Release Notes + if: matrix.buildpack != needs.release-prep.outputs.combined + env: + BUILDPACK_TYPE: ${{ needs.release-prep.outputs.buildpack_type }} + BUILDPACK: ${{ matrix.buildpack }} + run: | + jam_version="$(curl "https://api.github.com/repos/paketo-buildpacks/jam/releases/latest" \ + --fail-with-body --show-error \ + --header "Authorization: token ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}" \ + --location --silent \ + | jq -r -S .tag_name)" + + mkdir -p "${HOME}/bin" + export PATH="${HOME}/bin:${PATH}" + curl "https://github.com/paketo-buildpacks/jam/releases/download/${jam_version}/jam-linux" \ + --fail-with-body --show-error --silent --location \ + --output "${HOME}/bin/jam" + chmod +x "${HOME}/bin/jam" + + jam summarize \ + --"${BUILDPACK_TYPE}" "build/${BUILDPACK}.cnb" \ + --format markdown > ./release_notes_raw + + - name: Get Image Digest + id: image_digest + env: + BUILDPACK_TYPE: ${{ needs.release-prep.outputs.buildpack_type }} + BUILDPACK: ${{ matrix.buildpack }} + run: | + image_name="localhost:5000/${BUILDPACK}:latest" + + ./scripts/publish.sh \ + --buildpack-type "${BUILDPACK_TYPE}" \ + --archive-path "build/${BUILDPACK}.tgz" \ + --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 Release Notes + env: + BUILDPACK: ${{ matrix.buildpack }} + IMAGE_DIGEST: ${{ steps.image_digest.outputs.digest }} + run: | + sed -E \ + "s/\*\*Digest:\*\* \`sha256:[a-f0-9]{64}\`/\*\*Digest:\*\* \`${IMAGE_DIGEST}\`/" \ + ./release_notes_raw > "./release_notes_${BUILDPACK}" + + printf '%s' "${IMAGE_DIGEST}" > "./${BUILDPACK}-index-digest.sha256" + + - name: Upload release notes artifact + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: release-notes-${{ matrix.buildpack }} + path: | + ./release_notes_${{ matrix.buildpack }} + ./${{ matrix.buildpack }}-index-digest.sha256 + retention-days: 1 + + release-multi: + name: Release (multi) + runs-on: ubuntu-24.04 + needs: [unit, release-prep, generate-notes] + if: ${{ needs.unit.outputs.multi == 'true' }} + permissions: + contents: write # create and update the draft release + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Download build artifacts + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 + with: + name: build-artifacts + path: build/ + + - name: Download all release notes artifacts + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 + with: + pattern: release-notes-* + merge-multiple: true + path: ./release-notes/ + + - name: Assemble Release Notes + env: + COMBINED: ${{ needs.release-prep.outputs.combined }} + COMPONENTS: ${{ needs.release-prep.outputs.components }} + run: | + cat "./release-notes/release_notes_${COMBINED}" > ./release_notes + for buildpack in $(jq -r '.[]' <<< "${COMPONENTS}"); do + printf "\n\n---\n\n" >> ./release_notes + cat "./release-notes/release_notes_${buildpack}" >> ./release_notes + done + + - name: Create release assets + id: create_release_assets + env: + REPO_NAME: ${{ github.event.repository.name }} + TAG: ${{ needs.release-prep.outputs.tag }} + run: | + source "${GITHUB_WORKSPACE}/scripts/.util/implementation.sh" + + release_assets='[]' + + for filepath in build/*.cnb; do + filename=$(basename "$filepath") + name="${filename%.cnb}" + suffix="$(util::implementation::asset-suffix "${GITHUB_WORKSPACE}" "${name}")" + asset_name="${REPO_NAME}-${TAG}${suffix}.cnb" + release_assets=$(echo "$release_assets" | jq --arg name "${asset_name}" --arg path "$filepath" \ + '. + [{"path": $path, "name": $name, "content_type": "application/gzip"}]') + done + + for filepath in build/*.tgz; do + filename=$(basename "$filepath") + name="${filename%.tgz}" + suffix="$(util::implementation::asset-suffix "${GITHUB_WORKSPACE}" "${name}")" + asset_name="${REPO_NAME}-${TAG}${suffix}.tgz" + release_assets=$(echo "$release_assets" | jq --arg name "${asset_name}" --arg path "$filepath" \ + '. + [{"path": $path, "name": $name, "content_type": "application/gzip"}]') + done + + for filepath in ./release-notes/*-index-digest.sha256; do + filename=$(basename "$filepath") + name="${filename%-index-digest.sha256}" + suffix="$(util::implementation::asset-suffix "${GITHUB_WORKSPACE}" "${name}")" + asset_name="${REPO_NAME}-${TAG}${suffix}-index-digest.sha256" + release_assets=$(echo "$release_assets" | jq --arg name "${asset_name}" --arg path "$filepath" \ + '. + [{"path": $path, "name": $name, "content_type": "text/plain"}]') + 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 + with: + repo: ${{ github.repository }} + token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} + tag_name: v${{ needs.release-prep.outputs.tag }} + target_commitish: ${{ github.sha }} + name: v${{ needs.release-prep.outputs.tag }} + body_filepath: "./release_notes" + draft: true + assets: ${{ steps.create_release_assets.outputs.release_assets }} + failure: name: Alert on Failure runs-on: ubuntu-24.04 - needs: [ unit, integration, release ] - if: ${{ always() && needs.unit.result == 'failure' || needs.integration.result == 'failure' || needs.release.result == 'failure' }} + needs: [unit, integration, release, release-prep, generate-notes, release-multi] + if: ${{ always() && (needs.unit.result == 'failure' || needs.integration.result == 'failure' || needs.release.result == 'failure' || needs.release-prep.result == 'failure' || needs.generate-notes.result == 'failure' || needs.release-multi.result == 'failure') }} permissions: contents: read issues: write diff --git a/.github/workflows/label-pr.yml b/.github/workflows/label-pr.yml index 684baa7..3289e80 100644 --- a/.github/workflows/label-pr.yml +++ b/.github/workflows/label-pr.yml @@ -1,6 +1,6 @@ name: Set / Validate PR Labels on: - pull_request_target: + pull_request: branches: - main types: @@ -22,8 +22,9 @@ jobs: name: Ensure Minimal Semver Labels runs-on: ubuntu-24.04 permissions: - issues: read # read the issue's current labels - pull-requests: read # read the pull request's metadata + contents: read # check out the repository to determine which files changed + issues: write # add the semver label + pull-requests: write # update the pull request's labels steps: - name: Check Minimal Semver Labels uses: mheap/github-action-required-labels@23e10fde7e062233401931a0eece796cd9bf3177 # v5.6.0 @@ -35,7 +36,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Auto-label Semver - if: ${{ failure() }} + # Pull requests from forks receive a read-only token, so they cannot be + # auto-labeled. A maintainer must add the label to those pull requests. + if: ${{ failure() && github.event.pull_request.head.repo.full_name == github.repository }} uses: paketo-buildpacks/github-config/actions/pull-request/auto-semver-label@main env: - GITHUB_TOKEN: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/push-buildpackage.yml b/.github/workflows/push-buildpackage.yml index 068015b..171da31 100644 --- a/.github/workflows/push-buildpackage.yml +++ b/.github/workflows/push-buildpackage.yml @@ -16,9 +16,34 @@ permissions: contents: read jobs: + prepare: + name: Read Buildpack List + runs-on: ubuntu-24.04 + outputs: + buildpacks: ${{ steps.config.outputs.buildpacks }} + multi: ${{ steps.config.outputs.multi }} + steps: + + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Read Implementation Config + id: config + run: | + source "${GITHUB_WORKSPACE}/scripts/.util/implementation.sh" + echo "buildpacks=$(util::implementation::buildpacks "${GITHUB_WORKSPACE}")" >> "$GITHUB_OUTPUT" + echo "multi=$(util::implementation::is_multi "${GITHUB_WORKSPACE}")" >> "$GITHUB_OUTPUT" + push: name: Push runs-on: ubuntu-24.04 + needs: prepare + strategy: + matrix: + buildpack: ${{ fromJSON(needs.prepare.outputs.buildpacks) }} + fail-fast: false env: GCR_REGISTRY: "gcr.io" GCR_PASSWORD: ${{ secrets.GCR_PUSH_BOT_JSON_KEY }} @@ -36,36 +61,41 @@ jobs: - name: Parse Event id: event + env: + BUILDPACK: ${{ matrix.buildpack }} run: | + suffix="$(source "${GITHUB_WORKSPACE}/scripts/.util/implementation.sh"; util::implementation::asset-suffix "${GITHUB_WORKSPACE}" "${BUILDPACK}")" + FULL_VERSION="$(jq -r '.release.tag_name' "${GITHUB_EVENT_PATH}" | sed s/^v//)" MINOR_VERSION="$(echo "${FULL_VERSION}" | awk -F '.' '{print $1 "." $2 }')" MAJOR_VERSION="$(echo "${FULL_VERSION}" | awk -F '.' '{print $1 }')" echo "tag_full=${FULL_VERSION}" >> "$GITHUB_OUTPUT" echo "tag_minor=${MINOR_VERSION}" >> "$GITHUB_OUTPUT" echo "tag_major=${MAJOR_VERSION}" >> "$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" + echo "asset_suffix=${suffix}" >> "$GITHUB_OUTPUT" + echo "download_tgz_file_url=$(jq -r --arg suffix "${suffix}" '.release.assets[] | select(.name | endswith($suffix + ".tgz")) | .url' "${GITHUB_EVENT_PATH}")" >> "$GITHUB_OUTPUT" + echo "download_cnb_file_url=$(jq -r --arg tag_full "$FULL_VERSION" --arg suffix "${suffix}" '.release.assets[] | select(.name | endswith($tag_full + $suffix + ".cnb")) | .url' "${GITHUB_EVENT_PATH}")" >> "$GITHUB_OUTPUT" + echo "download_sha256_file_url=$(jq -r --arg suffix "${suffix}" '.release.assets[] | select(.name | endswith($suffix + "-index-digest.sha256")) | .url' "${GITHUB_EVENT_PATH}")" >> "$GITHUB_OUTPUT" - name: Download .cnb buildpack uses: paketo-buildpacks/github-config/actions/release/download-asset@main with: url: ${{ steps.event.outputs.download_cnb_file_url }} - output: "/github/workspace/buildpackage.cnb" + output: "/github/workspace/buildpackage${{ steps.event.outputs.asset_suffix }}.cnb" token: ${{ secrets.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" + output: "/github/workspace/buildpack${{ steps.event.outputs.asset_suffix }}.tgz" token: ${{ secrets.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" + output: "/github/workspace/index-digest${{ steps.event.outputs.asset_suffix }}.sha256" token: ${{ secrets.GITHUB_TOKEN }} - name: Parse Configs @@ -91,8 +121,9 @@ jobs: - name: Validate version env: TAG_FULL: ${{ steps.event.outputs.tag_full }} + ASSET_SUFFIX: ${{ steps.event.outputs.asset_suffix }} run: | - buidpackTomlVersion=$(sudo skopeo inspect "oci-archive:${GITHUB_WORKSPACE}/buildpackage.cnb" | jq -r '.Labels."io.buildpacks.buildpackage.metadata" | fromjson | .version') + buidpackTomlVersion=$(sudo skopeo inspect "oci-archive:${GITHUB_WORKSPACE}/buildpackage${ASSET_SUFFIX}.cnb" | jq -r '.Labels."io.buildpacks.buildpackage.metadata" | fromjson | .version') githubReleaseVersion="${TAG_FULL}" if [[ "$buidpackTomlVersion" != "$githubReleaseVersion" ]]; then echo "Version in buildpack.toml ($buidpackTomlVersion) and github release ($githubReleaseVersion) are not identical" @@ -109,21 +140,21 @@ jobs: fi - name: Docker login docker.io - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 with: username: ${{ env.DOCKERHUB_USERNAME }} password: ${{ env.DOCKERHUB_PASSWORD }} registry: ${{ env.DOCKERHUB_REGISTRY }} - name: Docker login gcr.io - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 if: ${{ steps.parse_configs.outputs.push_to_gcr == 'true' }} with: username: ${{ env.GCR_USERNAME }} password: ${{ env.GCR_PASSWORD }} registry: ${{ env.GCR_REGISTRY }} - - uses: buildpacks/github-actions/setup-tools@af8c06ccd592e27001cbf78083dcc9b47aa6652a # v6.1.1 + - uses: buildpacks/github-actions/setup-tools@50b58314ff7858c48496a3fee25308c8a18eae79 # v6.2.3 - name: Push to DockerHub if: ${{ steps.parse_configs.outputs.push_to_dockerhub == 'true' }} id: push @@ -133,22 +164,25 @@ jobs: TAG_FULL: ${{ steps.event.outputs.tag_full }} TAG_MINOR: ${{ steps.event.outputs.tag_minor }} TAG_MAJOR: ${{ steps.event.outputs.tag_major }} + ASSET_SUFFIX: ${{ steps.event.outputs.asset_suffix }} + BUILDPACK: ${{ matrix.buildpack }} run: | - IMAGE="${GITHUB_REPOSITORY_OWNER/-/}/${GITHUB_REPOSITORY#${GITHUB_REPOSITORY_OWNER}/}" # translates 'paketo-buildpacks/bundle-install' to 'paketobuildpacks/bundle-install' + IMAGE_NAME="$(source "${GITHUB_WORKSPACE}/scripts/.util/implementation.sh"; util::implementation::image "${GITHUB_WORKSPACE}" "${BUILDPACK}")" + IMAGE="paketobuildpacks/${IMAGE_NAME}" echo "${DOCKERHUB_PASSWORD}" | sudo skopeo login --username "${DOCKERHUB_USERNAME}" --password-stdin ${DOCKERHUB_REGISTRY} ./scripts/publish.sh \ - --archive-path ./buildpack.tgz \ + --archive-path "./buildpack${ASSET_SUFFIX}.tgz" \ --buildpack-type "${BUILDPACK_TYPE}" \ --image-ref "${DOCKERHUB_REGISTRY}/${IMAGE}:${TAG_FULL}" ## Validate that the image index digest pushed to registry matches with the one on the release notes pushed_image_index_digest=$(crane digest "${DOCKERHUB_REGISTRY}/${IMAGE}:${TAG_FULL}" | xargs) - echo "Index digest from release notes: $(cat ./index-digest.sha256)" + echo "Index digest from release notes: $(cat ./index-digest${ASSET_SUFFIX}.sha256)" echo "Index digest pushed to registry: $pushed_image_index_digest" - if [ "$(cat ./index-digest.sha256)" != "$pushed_image_index_digest" ]; then + if [ "$(cat ./index-digest${ASSET_SUFFIX}.sha256)" != "$pushed_image_index_digest" ]; then echo "The image index digest pushed to registry does not match the expected digest from release notes" exit 1; fi @@ -157,25 +191,27 @@ jobs: sudo skopeo copy "docker://${DOCKERHUB_REGISTRY}/${IMAGE}:${TAG_FULL}" "docker://${DOCKERHUB_REGISTRY}/${IMAGE}:${TAG_MAJOR}" --multi-arch all sudo skopeo copy "docker://${DOCKERHUB_REGISTRY}/${IMAGE}:${TAG_FULL}" "docker://${DOCKERHUB_REGISTRY}/${IMAGE}:latest" --multi-arch all echo "image=${IMAGE}" >> "$GITHUB_OUTPUT" + echo "image_name=${IMAGE_NAME}" >> "$GITHUB_OUTPUT" echo "digest=$pushed_image_index_digest" >> "$GITHUB_OUTPUT" - name: Push to GCR if: ${{ steps.parse_configs.outputs.push_to_gcr == 'true' }} env: PUSH_IMAGE: ${{ steps.push.outputs.image }} - REPOSITORY: ${{ github.repository }} + PUSH_IMAGE_NAME: ${{ steps.push.outputs.image_name }} TAG_FULL: ${{ steps.event.outputs.tag_full }} TAG_MINOR: ${{ steps.event.outputs.tag_minor }} TAG_MAJOR: ${{ steps.event.outputs.tag_major }} run: | echo "${GCR_PASSWORD}" | sudo skopeo login --username "${GCR_USERNAME}" --password-stdin "${GCR_REGISTRY}" - sudo skopeo copy "docker://${DOCKERHUB_REGISTRY}/${PUSH_IMAGE}" "docker://${GCR_REGISTRY}/${REPOSITORY}:${TAG_FULL}" --multi-arch all - sudo skopeo copy "docker://${DOCKERHUB_REGISTRY}/${PUSH_IMAGE}" "docker://${GCR_REGISTRY}/${REPOSITORY}:${TAG_MINOR}" --multi-arch all - sudo skopeo copy "docker://${DOCKERHUB_REGISTRY}/${PUSH_IMAGE}" "docker://${GCR_REGISTRY}/${REPOSITORY}:${TAG_MAJOR}" --multi-arch all - sudo skopeo copy "docker://${DOCKERHUB_REGISTRY}/${PUSH_IMAGE}" "docker://${GCR_REGISTRY}/${REPOSITORY}:latest" --multi-arch all + sudo skopeo copy "docker://${DOCKERHUB_REGISTRY}/${PUSH_IMAGE}" "docker://${GCR_REGISTRY}/paketo-buildpacks/${PUSH_IMAGE_NAME}:${TAG_FULL}" --multi-arch all + sudo skopeo copy "docker://${DOCKERHUB_REGISTRY}/${PUSH_IMAGE}" "docker://${GCR_REGISTRY}/paketo-buildpacks/${PUSH_IMAGE_NAME}:${TAG_MINOR}" --multi-arch all + sudo skopeo copy "docker://${DOCKERHUB_REGISTRY}/${PUSH_IMAGE}" "docker://${GCR_REGISTRY}/paketo-buildpacks/${PUSH_IMAGE_NAME}:${TAG_MAJOR}" --multi-arch all + sudo skopeo copy "docker://${DOCKERHUB_REGISTRY}/${PUSH_IMAGE}" "docker://${GCR_REGISTRY}/paketo-buildpacks/${PUSH_IMAGE_NAME}:latest" --multi-arch all - name: Register with CNB Registry + if: ${{ needs.prepare.outputs.multi != 'true' }} uses: docker://ghcr.io/buildpacks/actions/registry/request-add-entry@sha256:de7c15d1b8606c3189f0b5699bfdfe20afe5f6a315155932e801f334b0dae8f4 # main with: id: ${{ github.repository }} @@ -186,8 +222,8 @@ jobs: failure: name: Alert on Failure runs-on: ubuntu-24.04 - needs: [push] - if: ${{ always() && needs.push.result == 'failure' }} + needs: [prepare, push] + if: ${{ always() && (needs.prepare.result == 'failure' || needs.push.result == 'failure') }} permissions: contents: read issues: write diff --git a/.github/workflows/update-dependencies-from-metadata.yml b/.github/workflows/update-dependencies-from-metadata.yml index b94d427..fc63eaf 100644 --- a/.github/workflows/update-dependencies-from-metadata.yml +++ b/.github/workflows/update-dependencies-from-metadata.yml @@ -31,6 +31,7 @@ jobs: id: ${{ steps.retrieve.outputs.id }} length: ${{ steps.retrieve.outputs.length }} compilation-length: ${{ steps.retrieve.outputs.compilation-length }} + has-warnings: ${{ steps.check-warnings.outputs.has-warnings }} steps: - name: Check out code uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -55,7 +56,7 @@ jobs: make retrieve \ buildpackTomlPath="${GITHUB_WORKSPACE}/buildpack.toml" \ - output="${OUTPUT}" + output="${OUTPUT}" 2>&1 | tee /tmp/retrieve-output.log id=$(jq -r .[0].id < "${OUTPUT}") content=$(jq -r < "${OUTPUT}") @@ -76,6 +77,21 @@ jobs: printf "compilation-json<<%s\n%s\n%s\n" "${delimiter}" "${compilation}" "${delimiter}" >> "$GITHUB_OUTPUT" # see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings echo "compilation-length=$complength" >> "$GITHUB_OUTPUT" + - name: Check for Warnings/Errors + id: check-warnings + run: | + #!/usr/bin/env bash + set -euo pipefail + shopt -s inherit_errexit + + has_warnings="false" + if grep -iqE "warning|error" /tmp/retrieve-output.log; then + has_warnings="true" + echo "Warnings or errors detected in retrieve output:" + grep -iE "warning|error" /tmp/retrieve-output.log || true + fi + echo "has-warnings=${has_warnings}" >> "$GITHUB_OUTPUT" + - name: Upload `${{ steps.retrieve.outputs.metadata-filepath }}` uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: @@ -398,19 +414,28 @@ jobs: branch: automation/dependencies/update-from-metadata token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} + - name: Open Pull Request (no semver label) + if: ${{ steps.commit.outputs.commit_sha != '' && steps.update.outputs.semver_bump == '' }} + uses: paketo-buildpacks/github-config/actions/pull-request/open@main + with: + token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} + title: "Updates buildpack.toml with ${{ steps.update.outputs.new-versions }}" + branch: automation/dependencies/update-from-metadata + - name: Open Pull Request - if: ${{ steps.commit.outputs.commit_sha != '' }} + if: ${{ steps.commit.outputs.commit_sha != '' && steps.update.outputs.semver_bump != '' }} uses: paketo-buildpacks/github-config/actions/pull-request/open@main with: token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} title: "Updates buildpack.toml with ${{ steps.update.outputs.new-versions }}" branch: automation/dependencies/update-from-metadata + label: "semver:${{ steps.update.outputs.semver_bump }}" failure: name: Alert on Failure runs-on: ubuntu-24.04 needs: [ retrieve, get-compile-and-test, test, compile, update-metadata, assemble ] - if: ${{ always() && needs.retrieve.result == 'failure' || needs.get-compile-and-test.result == 'failure' || needs.test.result == 'failure' || needs.compile.result == 'failure' || needs.update-metadata.result == 'failure' || needs.assemble.result == 'failure' }} + if: ${{ always() && (needs.retrieve.result == 'failure' || needs.get-compile-and-test.result == 'failure' || needs.test.result == 'failure' || needs.compile.result == 'failure' || needs.update-metadata.result == 'failure' || needs.assemble.result == 'failure' || needs.retrieve.outputs.has-warnings == 'true') }} permissions: contents: read issues: write diff --git a/scripts/.util/implementation.sh b/scripts/.util/implementation.sh new file mode 100644 index 0000000..d85d51d --- /dev/null +++ b/scripts/.util/implementation.sh @@ -0,0 +1,101 @@ +#!/usr/bin/env bash + +set -eu +set -o pipefail + +# shellcheck source=SCRIPTDIR/tools.sh +source "$(dirname "${BASH_SOURCE[0]}")/tools.sh" + +# Shared helpers for implementation repositories. +# +# A repository that packages a combined buildpack plus one buildpack per +# component opts in by adding a multi-implementation.json file at its root. +# Repositories without that file get the default in-memory config below, so +# every caller can read the same normalized shape regardless of layout. + +function util::implementation::config-path() { + local root + root="${1}" + printf '%s/multi-implementation.json' "${root}" +} + +function util::implementation::default-config() { + local root name + root="${1}" + name="$(util::tools::repo-name "${root}")" + + jq --null-input --compact-output --arg name "${name}" '{ + multi: false, + combined: $name, + integration: true, + "libpak-tools": null, + buildpacks: [{name: $name, image: $name}] + }' +} + +function util::implementation::config() { + local root path name + root="${1}" + path="$(util::implementation::config-path "${root}")" + + if [[ ! -f "${path}" ]]; then + util::implementation::default-config "${root}" + return + fi + + name="$(util::tools::repo-name "${root}")" + jq --compact-output --arg name "${name}" '{ + multi: true, + combined: (.combined // $name), + integration: (if has("integration") then .integration else true end), + "libpak-tools": (."libpak-tools" // null), + buildpacks: ((.buildpacks // []) | map({name: .name, image: (.image // .name)})) + }' "${path}" +} + +function util::implementation::is_multi() { + util::implementation::config "${1}" | jq -r '.multi' +} + +function util::implementation::combined() { + util::implementation::config "${1}" | jq -r '.combined' +} + +function util::implementation::buildpacks() { + util::implementation::config "${1}" | jq --compact-output '[.buildpacks[].name]' +} + +function util::implementation::components() { + local root combined + root="${1}" + combined="$(util::implementation::combined "${root}")" + + util::implementation::config "${root}" \ + | jq --compact-output --arg combined "${combined}" \ + '[.buildpacks[].name | select(. != $combined)]' +} + +function util::implementation::integration() { + util::implementation::config "${1}" | jq -r '.integration' +} + +function util::implementation::image() { + local root name + root="${1}" + name="${2}" + + util::implementation::config "${root}" \ + | jq -r --arg name "${name}" '.buildpacks[] | select(.name == $name) | .image' +} + +function util::implementation::asset-suffix() { + local root name + root="${1}" + name="${2}" + + if [[ "$(util::implementation::is_multi "${root}")" == "true" ]]; then + printf '%s' "-${name}" + else + printf '' + fi +} diff --git a/scripts/.util/tools.json b/scripts/.util/tools.json index ad03c3f..a61952f 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,6 +1,6 @@ { "createpackage": "v1.73.0", "jam": "v2.19.1", - "libpaktools": "v0.6.0", + "libpaktools": "v0.8.0", "pack": "v0.40.10" } diff --git a/scripts/.util/tools.sh b/scripts/.util/tools.sh index 2d0c9a2..e8348b5 100644 --- a/scripts/.util/tools.sh +++ b/scripts/.util/tools.sh @@ -46,6 +46,17 @@ function util::tools::arch() { esac } +function util::tools::repo-name() { + local root + root="${1}" + + if [[ -n "${GITHUB_REPOSITORY:-}" ]]; then + printf '%s' "${GITHUB_REPOSITORY#*/}" + else + basename "${root}" + fi +} + function util::tools::path::export() { local dir dir="${1}" diff --git a/scripts/package.sh b/scripts/package.sh index cb79bfd..5cd5548 100755 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -13,6 +13,9 @@ source "${ROOT_DIR}/scripts/.util/tools.sh" # shellcheck source=SCRIPTDIR/.util/print.sh source "${ROOT_DIR}/scripts/.util/print.sh" +# shellcheck source=SCRIPTDIR/.util/implementation.sh +source "${ROOT_DIR}/scripts/.util/implementation.sh" + function main { local version output token token="" @@ -69,8 +72,13 @@ function main { buildpack_type=extension fi - buildpack::archive "${version}" "${buildpack_type}" - buildpackage::create "${output}" "${buildpack_type}" + if [[ "$(util::implementation::is_multi "${ROOT_DIR}")" == "true" ]]; then + buildpackage::create::individual "${version}" "${buildpack_type}" + buildpackage::create::combined "${version}" "${buildpack_type}" + else + buildpack::archive "${version}" "${buildpack_type}" + buildpackage::create "${output}" "${buildpack_type}" + fi } function usage() { @@ -79,6 +87,10 @@ package.sh --version [OPTIONS] Packages a buildpack or an extension into a buildpackage .cnb file. +When multi-implementation.json exists, packages the combined buildpack and one +buildpack per component instead. The components and the libpak-tools command are +read from ${ROOT_DIR}/multi-implementation.json. + OPTIONS --help -h prints the command usage --version -v specifies the version number to use when packaging a buildpack or an extension @@ -109,6 +121,10 @@ function tools::install() { if [[ -f "${ROOT_DIR}/.libbuildpack" ]]; then util::tools::packager::install \ --directory "${BIN_DIR}" + elif [[ "$(util::implementation::is_multi "${ROOT_DIR}")" == "true" ]]; then + util::tools::libpak-tools::install \ + --directory "${BIN_DIR}" \ + --token "${token}" else util::tools::jam::install \ --directory "${BIN_DIR}" \ @@ -155,4 +171,55 @@ function buildpackage::create() { rm -rf ${BUILD_DIR}/cnbdir } +function buildpackage::create::individual() { + local version buildpack_type combined command artifact_flag config + version="${1}" + buildpack_type="${2}" + config="$(util::implementation::config "${ROOT_DIR}")" + + combined="$(util::implementation::combined "${ROOT_DIR}")" + command="$(jq -r '."libpak-tools".command' <<< "${config}")" + artifact_flag="$(jq -r '."libpak-tools"."artifact-flag"' <<< "${config}")" + + util::print::title "Packaging ${buildpack_type}..." + + local args=() + while IFS= read -r name; do + args+=( + --buildpack-id "paketo-buildpacks/${name}@${version}" + "--${artifact_flag}" "${name}" + ) + done < <(jq -r --arg combined "${combined}" '.buildpacks[].name | select(. != $combined)' <<< "${config}") + + if [[ ${#args[@]} -eq 0 ]]; then + util::print::error "no component buildpacks configured in $(util::implementation::config-path "${ROOT_DIR}")" + fi + + libpak-tools "${command}" "${args[@]}" \ + --format file \ + --buildpack-path . \ + --output-path "${BUILD_DIR}" +} + +function buildpackage::create::combined() { + local version buildpack_type combined command include_all_flag config + version="${1}" + buildpack_type="${2}" + config="$(util::implementation::config "${ROOT_DIR}")" + + combined="$(util::implementation::combined "${ROOT_DIR}")" + command="$(jq -r '."libpak-tools".command' <<< "${config}")" + include_all_flag="$(jq -r '."libpak-tools"."include-all-flag"' <<< "${config}")" + + util::print::title "Packaging ${buildpack_type}..." + + libpak-tools "${command}" \ + --single-buildpack \ + --buildpack-id "paketo-buildpacks/${combined}@${version}" \ + "--${include_all_flag}" \ + --format file \ + --buildpack-path . \ + --output-path "${BUILD_DIR}" +} + main "${@:-}" \ No newline at end of file From c720a582a171054e24d6cc1e4f27eadc92363cac Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Fri, 13 Nov 2026 13:31:46 +0000 Subject: [PATCH 2/4] Updating github-config --- .github/workflows/label-pr.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/label-pr.yml b/.github/workflows/label-pr.yml index 3289e80..41c55ce 100644 --- a/.github/workflows/label-pr.yml +++ b/.github/workflows/label-pr.yml @@ -26,6 +26,19 @@ jobs: issues: write # add the semver label pull-requests: write # update the pull request's labels steps: + - name: Detect existing label + id: detect_label + run: | + set -euo pipefail + label_exists=$(jq -r '.pull_request.labels // [] | map(.name) | length > 0' "${GITHUB_EVENT_PATH}") + echo "label_exists=${label_exists}" >> "${GITHUB_OUTPUT}" + + - name: Auto-label Semver + if: ${{ github.event.pull_request.head.repo.full_name == github.repository && steps.detect_label.outputs.label_exists != 'true' }} + uses: paketo-buildpacks/github-config/actions/pull-request/auto-semver-label@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Check Minimal Semver Labels uses: mheap/github-action-required-labels@23e10fde7e062233401931a0eece796cd9bf3177 # v5.6.0 with: @@ -34,11 +47,3 @@ jobs: mode: exactly env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Auto-label Semver - # Pull requests from forks receive a read-only token, so they cannot be - # auto-labeled. A maintainer must add the label to those pull requests. - if: ${{ failure() && github.event.pull_request.head.repo.full_name == github.repository }} - uses: paketo-buildpacks/github-config/actions/pull-request/auto-semver-label@main - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 058220616b3c4c3eade41f756995786d2d2e55cd Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Wed, 18 Nov 2026 13:31:36 +0000 Subject: [PATCH 3/4] Updating github-config --- .github/workflows/label-pr.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/label-pr.yml b/.github/workflows/label-pr.yml index 41c55ce..d6fa587 100644 --- a/.github/workflows/label-pr.yml +++ b/.github/workflows/label-pr.yml @@ -26,15 +26,15 @@ jobs: issues: write # add the semver label pull-requests: write # update the pull request's labels steps: - - name: Detect existing label + - name: Detect existing semver label id: detect_label run: | set -euo pipefail - label_exists=$(jq -r '.pull_request.labels // [] | map(.name) | length > 0' "${GITHUB_EVENT_PATH}") - echo "label_exists=${label_exists}" >> "${GITHUB_OUTPUT}" + semver_label_exists=$(jq -r '.pull_request.labels // [] | map(.name) | any(startswith("semver:"))' "${GITHUB_EVENT_PATH}") + echo "semver_label_exists=${semver_label_exists}" >> "${GITHUB_OUTPUT}" - name: Auto-label Semver - if: ${{ github.event.pull_request.head.repo.full_name == github.repository && steps.detect_label.outputs.label_exists != 'true' }} + if: ${{ github.event.pull_request.head.repo.full_name == github.repository && steps.detect_label.outputs.semver_label_exists != 'true' }} uses: paketo-buildpacks/github-config/actions/pull-request/auto-semver-label@main env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 9b4187bc1b1a723791ad950fb9552a18622734e3 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Thu, 19 Nov 2026 13:31:44 +0000 Subject: [PATCH 4/4] Updating github-config --- .github/workflows/create-draft-release.yml | 8 ++++---- .github/workflows/lint.yml | 2 +- .github/workflows/test-pull-request.yml | 4 ++-- .github/workflows/update-dependencies-from-metadata.yml | 2 +- .github/workflows/update-go-mod-version.yml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/create-draft-release.yml b/.github/workflows/create-draft-release.yml index 06ae2c6..a526905 100644 --- a/.github/workflows/create-draft-release.yml +++ b/.github/workflows/create-draft-release.yml @@ -33,7 +33,7 @@ jobs: with: persist-credentials: false - name: Setup Go - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0 with: go-version-file: go.mod - name: Run Unit Tests @@ -70,7 +70,7 @@ jobs: with: persist-credentials: false - name: Setup Go - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0 with: go-version-file: go.mod - name: Free Disk Space @@ -120,7 +120,7 @@ jobs: fetch-tags: true - name: Setup Go - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0 with: go-version-file: go.mod @@ -290,7 +290,7 @@ jobs: fetch-tags: true - name: Setup Go - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0 with: go-version-file: go.mod diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e705832..b091390 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,7 +23,7 @@ jobs: persist-credentials: false - name: Setup Go - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0 with: go-version-file: go.mod diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index 68ba84e..830dc83 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -26,7 +26,7 @@ jobs: persist-credentials: false - name: Setup Go - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0 with: go-version-file: go.mod @@ -74,7 +74,7 @@ jobs: swap-storage: true - name: Setup Go - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0 with: go-version-file: go.mod diff --git a/.github/workflows/update-dependencies-from-metadata.yml b/.github/workflows/update-dependencies-from-metadata.yml index fc63eaf..fe8e14e 100644 --- a/.github/workflows/update-dependencies-from-metadata.yml +++ b/.github/workflows/update-dependencies-from-metadata.yml @@ -39,7 +39,7 @@ jobs: persist-credentials: false - name: Setup Go - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0 with: # hashFiles returns empty string if file does not exist go-version-file: ${{ hashFiles('dependency/retrieval/go.mod') != '' && 'dependency/retrieval/go.mod' || 'go.mod' }} diff --git a/.github/workflows/update-go-mod-version.yml b/.github/workflows/update-go-mod-version.yml index 3919e29..0d6f686 100644 --- a/.github/workflows/update-go-mod-version.yml +++ b/.github/workflows/update-go-mod-version.yml @@ -28,7 +28,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Go id: setup-go - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0 # Fetching the latest stable Go version with: go-version: stable