From 0dd4ff514b43b62033abb21c82a4a72624b7fd29 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Wed, 27 Mar 2024 13:33:45 +0000 Subject: [PATCH 1/8] Updating github-config --- scripts/build.sh | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index a3e1d3d5..bf990052 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -56,7 +56,15 @@ function run::build() { echo "Success!" - for name in detect build; do + names=("detect") + + if [ -f "extension.toml" ]; then + names+=("generate") + else + names+=("build") + fi + + for name in "${names[@]}"; do printf "%s" "Linking ${name}... " ln -sf "run" "${name}" @@ -73,16 +81,20 @@ function cmd::build() { for src in "${BUILDPACKDIR}"/cmd/*; do name="$(basename "${src}")" - printf "%s" "Building ${name}... " + 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" + GOOS="linux" \ + CGO_ENABLED=0 \ + go build \ + -ldflags="-s -w" \ + -o "${BUILDPACKDIR}/bin/${name}" \ + "${src}/main.go" - echo "Success!" + echo "Success!" + else + printf "%s" "Skipping ${name}... " + fi done fi } From f80577425dc89a9c9936c47f4ea3033f2ae6011b Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Sat, 6 Apr 2024 13:33:08 +0000 Subject: [PATCH 2/8] 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 88b5a31a..78b46073 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { - "createpackage": "v1.69.0", + "createpackage": "v1.69.1", "jam": "v2.7.1", "pack": "v0.33.2" } From 024ec735acf9ea7f48e39405009c9e3a0d8eb11b Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Fri, 19 Apr 2024 13:35:11 +0000 Subject: [PATCH 3/8] 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 78b46073..76f8dd49 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.69.1", - "jam": "v2.7.1", + "jam": "v2.7.2", "pack": "v0.33.2" } From 7f89eb1277e4f6e2980aeb4245ee6d5a281b2f79 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Sat, 4 May 2024 13:33:02 +0000 Subject: [PATCH 4/8] Updating github-config --- .github/dependabot.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 1f5b2152..bf99f0e3 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -16,3 +16,8 @@ updates: update-types: - "minor" - "patch" + exclude-patterns: + - "github.com/anchore/stereoscope" + - "github.com/testcontainers/testcontainers-go" + - "github.com/docker/docker" + - "github.com/containerd/containerd" From 3528806057991fc5c940961404a65d08687aecf5 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Fri, 10 May 2024 13:33:04 +0000 Subject: [PATCH 5/8] 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 76f8dd49..92f3372d 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { - "createpackage": "v1.69.1", + "createpackage": "v1.70.0", "jam": "v2.7.2", "pack": "v0.33.2" } From f29e4af4a336d5d3902657272af67659b1c620fc Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Fri, 31 May 2024 13:32:50 +0000 Subject: [PATCH 6/8] 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 92f3372d..52887a4b 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.70.0", "jam": "v2.7.2", - "pack": "v0.33.2" + "pack": "v0.34.0" } From a5f4d0bbfdd2443120156e78026044492a84a6e4 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Sat, 1 Jun 2024 13:33:19 +0000 Subject: [PATCH 7/8] 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 52887a4b..4ca13fa2 100644 --- a/scripts/.util/tools.json +++ b/scripts/.util/tools.json @@ -1,5 +1,5 @@ { "createpackage": "v1.70.0", "jam": "v2.7.2", - "pack": "v0.34.0" + "pack": "v0.34.1" } From 6f23df8102ba2a96d73efec74e92581e0dbe33bf Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Wed, 5 Jun 2024 13:36:54 +0000 Subject: [PATCH 8/8] Updating github-config --- .github/workflows/publish-releases.yml | 41 +++++++++ .github/workflows/update-go-mod-version.yml | 93 +++++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 .github/workflows/publish-releases.yml create mode 100644 .github/workflows/update-go-mod-version.yml diff --git a/.github/workflows/publish-releases.yml b/.github/workflows/publish-releases.yml new file mode 100644 index 00000000..495341ad --- /dev/null +++ b/.github/workflows/publish-releases.yml @@ -0,0 +1,41 @@ +name: Publish Draft Releases + +on: + workflow_dispatch: {} + schedule: + - cron: '0 5 * * WED' # Weekly on Wednesday at 5:00 AM UTC + +concurrency: + group: publish-release + +jobs: + publish: + name: Publish + runs-on: ubuntu-22.04 + steps: + - name: Publish Draft Release With Highest Semantic Version + id: drafts + env: + GITHUB_TOKEN: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} + uses: paketo-buildpacks/github-config/actions/release/publish-drafts@main + with: + repo: ${{ github.repository }} + + failure: + name: Alert on Failure + runs-on: ubuntu-22.04 + needs: [ publish ] + if: ${{ always() && needs.publish.result == 'failure' }} + steps: + - name: File Failure Alert Issue + uses: paketo-buildpacks/github-config/actions/issue/file@main + with: + token: ${{ secrets.GITHUB_TOKEN }} + repo: ${{ github.repository }} + label: "failure:release" + comment_if_exists: true + issue_title: "Failure: Publish draft releases" + issue_body: | + Publish All Draft Releases workflow [failed](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}). + comment_body: | + Another failure occurred: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} diff --git a/.github/workflows/update-go-mod-version.yml b/.github/workflows/update-go-mod-version.yml new file mode 100644 index 00000000..2cc949ca --- /dev/null +++ b/.github/workflows/update-go-mod-version.yml @@ -0,0 +1,93 @@ +name: Update Go version + +on: + schedule: + - cron: '48 4 * * MON' # every monday at 4:48 UTC + workflow_dispatch: + +concurrency: update-go + +jobs: + update-go: + name: Update go toolchain in go.mod + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Checkout PR Branch + uses: paketo-buildpacks/github-config/actions/pull-request/checkout-branch@main + with: + branch: automation/go-mod-update/update-main + - name: Setup Go + id: setup-go + uses: actions/setup-go@v5 + with: + go-version: 'stable' + - name: Get current go toolchain version + id: current-go-version + uses: paketo-buildpacks/github-config/actions/update-go-mod-version@main + with: + toolchain-version: ${{ steps.setup-go.outputs.go-version }} + - name: Go mod tidy + run: | + #!/usr/bin/env bash + set -euo pipefail + shopt -s inherit_errexit + + echo "Before running go mod tidy" + echo "head -n10 go.mod " + head -n10 go.mod + + echo "git diff" + git diff + + echo "Running go mod tidy" + go mod tidy + + echo "After running go mod tidy" + echo "head -n10 go.mod " + head -n10 go.mod + + echo "git diff" + git diff + - name: Commit + 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 }}" + pathspec: "." + keyid: ${{ secrets.PAKETO_BOT_GPG_SIGNING_KEY_ID }} + key: ${{ secrets.PAKETO_BOT_GPG_SIGNING_KEY }} + + - name: Push Branch + if: ${{ steps.commit.outputs.commit_sha != '' }} + uses: paketo-buildpacks/github-config/actions/pull-request/push-branch@main + with: + branch: automation/go-mod-update/update-main + + - name: Open Pull Request + if: ${{ steps.commit.outputs.commit_sha != '' }} + 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 }}" + branch: automation/go-mod-update/update-main + + failure: + name: Alert on Failure + runs-on: ubuntu-22.04 + needs: [update-go] + if: ${{ always() && needs.update-go.result == 'failure' }} + steps: + - name: File Failure Alert Issue + uses: paketo-buildpacks/github-config/actions/issue/file@main + with: + token: ${{ secrets.GITHUB_TOKEN }} + repo: ${{ github.repository }} + label: "failure:update-go-version" + comment_if_exists: true + issue_title: "Failure: Update Go Mod Version workflow" + issue_body: | + Update Go Mod Version workflow [failed](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}). + comment_body: | + Another failure occurred: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}