diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 39449a6..284bfbf 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @initializ-buildpacks/utilities-maintainers \ No newline at end of file +* @paketo-buildpacks/utilities-maintainers \ No newline at end of file diff --git a/.github/pipeline-version b/.github/pipeline-version index e2ba070..5f24410 100644 --- a/.github/pipeline-version +++ b/.github/pipeline-version @@ -1 +1 @@ -1.37.5 +1.41.2 diff --git a/.github/workflows/pb-create-package.yml b/.github/workflows/pb-create-package.yml index 80a0920..d1ab8d6 100644 --- a/.github/workflows/pb-create-package.yml +++ b/.github/workflows/pb-create-package.yml @@ -18,7 +18,7 @@ jobs: username: ${{ secrets.INITIALIZ_BUILDPACKS_DOCKERHUB_USERNAME }} - uses: actions/setup-go@v5 with: - go-version: "1.22" + go-version: "1.23" - name: Install create-package run: | #!/usr/bin/env bash @@ -26,24 +26,13 @@ jobs: set -euo pipefail go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/create-package@latest - - uses: buildpacks/github-actions/setup-tools@v5.5.3 + - uses: buildpacks/github-actions/setup-tools@v5.7.2 with: crane-version: 0.19.1 yj-version: 5.1.0 - - name: Install pack - run: | - #!/usr/bin/env bash - # this is coming from a copy of https://github.com/buildpacks/pack/actions/runs/8118576298 stored on box - # TODO to revisit when the official one is out - set -euo pipefail - - echo "Installing pack experimental" - - mkdir -p "${HOME}"/bin - echo "${HOME}/bin" >> "${GITHUB_PATH}" - - curl -L "https://github.com/buildpacks/pack/releases/download/v0.34.2/pack-v0.34.2-linux.tgz" | tar xvz -C "${HOME}/bin" - chmod +x "${HOME}"/bin/pack + - uses: buildpacks/github-actions/setup-pack@v5.7.2 + with: + pack-version: 0.34.2 - name: Enable pack Experimental if: ${{ false }} run: | @@ -181,10 +170,10 @@ jobs: else pack -v buildpack package \ "${PACKAGE}:${VERSION}" ${CONFIG} \ - --format "${FORMAT}" + --format "${FORMAT}" $([ -n "$TTL_SH_PUBLISH" ] && [ "$TTL_SH_PUBLISH" = "true" ] && echo "--publish") fi env: - PACKAGES: docker.io/initializbuildpacks/procfile + PACKAGES: docker.io/initializbuildpacks/procfile PUBLISH: "true" VERSION: ${{ steps.version.outputs.version }} VERSION_MAJOR: ${{ steps.version.outputs.version-major }} @@ -212,7 +201,7 @@ jobs: DIGEST: ${{ steps.package.outputs.digest }} GITHUB_TOKEN: ${{ secrets.PAT }} - if: ${{ true }} - uses: docker://ghcr.io/buildpacks/actions/registry/request-add-entry:5.6.0 + uses: docker://ghcr.io/buildpacks/actions/registry/request-add-entry:5.7.2 with: address: docker.io/initializbuildpacks/procfile@${{ steps.package.outputs.digest }} id: initializ-buildpacks/procfile diff --git a/.github/workflows/pb-tests.yml b/.github/workflows/pb-tests.yml index 71e16a8..0b58905 100644 --- a/.github/workflows/pb-tests.yml +++ b/.github/workflows/pb-tests.yml @@ -15,9 +15,16 @@ jobs: runs-on: - ubuntu-latest steps: + - name: Docker login docker.io + if: ${{ (github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork) && (github.actor != 'dependabot[bot]') }} + uses: docker/login-action@v3 + with: + password: ${{ secrets.INITIALIZ_BUILDPACKS_DOCKERHUB_PASSWORD }} + registry: docker.io + username: ${{ secrets.INITIALIZ_BUILDPACKS_DOCKERHUB_USERNAME }} - uses: actions/setup-go@v5 with: - go-version: "1.22" + go-version: "1.23" - name: Install create-package run: | #!/usr/bin/env bash @@ -25,20 +32,9 @@ jobs: set -euo pipefail go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/create-package@latest - - name: Install pack - run: | - #!/usr/bin/env bash - # this is coming from a copy of https://github.com/buildpacks/pack/actions/runs/8118576298 stored on box - # TODO to revisit when the official one is out - set -euo pipefail - - echo "Installing pack experimental" - - mkdir -p "${HOME}"/bin - echo "${HOME}/bin" >> "${GITHUB_PATH}" - - curl -L "https://github.com/buildpacks/pack/releases/download/v0.34.2/pack-v0.34.2-linux.tgz" | tar xvz -C "${HOME}/bin" - chmod +x "${HOME}"/bin/pack + - uses: buildpacks/github-actions/setup-pack@v5.7.2 + with: + pack-version: 0.34.2 - name: Enable pack Experimental if: ${{ false }} run: | @@ -173,7 +169,7 @@ jobs: else pack -v buildpack package \ "${PACKAGE}:${VERSION}" ${CONFIG} \ - --format "${FORMAT}" + --format "${FORMAT}" $([ -n "$TTL_SH_PUBLISH" ] && [ "$TTL_SH_PUBLISH" = "true" ] && echo "--publish") fi env: FORMAT: image @@ -193,7 +189,7 @@ jobs: restore-keys: ${{ runner.os }}-go- - uses: actions/setup-go@v5 with: - go-version: "1.22" + go-version: "1.23" - name: Install richgo run: | #!/usr/bin/env bash diff --git a/.github/workflows/pb-update-go.yml b/.github/workflows/pb-update-go.yml index 89b95a0..310d2c9 100644 --- a/.github/workflows/pb-update-go.yml +++ b/.github/workflows/pb-update-go.yml @@ -1,7 +1,7 @@ name: Update Go "on": schedule: - - cron: 48 2 * * 1 + - cron: 21 2 * * 1 workflow_dispatch: {} jobs: update: @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: "1.22" + go-version: "1.23" - uses: actions/checkout@v4 - name: Update Go Version & Modules id: update-go @@ -25,7 +25,7 @@ jobs: exit 1 fi - OLD_GO_VERSION=$(grep -P '^go \d\.\d+' go.mod | cut -d ' ' -f 2) + OLD_GO_VERSION=$(grep -P '^go \d\.\d+' go.mod | cut -d ' ' -f 2 | cut -d '.' -f 1-2) go mod edit -go="$GO_VERSION" go mod tidy @@ -49,7 +49,7 @@ jobs: echo "commit-body=${COMMIT_BODY}" >> "$GITHUB_OUTPUT" echo "commit-semver=${COMMIT_SEMVER}" >> "$GITHUB_OUTPUT" env: - GO_VERSION: "1.22" + GO_VERSION: "1.23" - uses: peter-evans/create-pull-request@v6 with: author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com> @@ -69,4 +69,4 @@ jobs: labels: ${{ steps.update-go.outputs.commit-semver }}, type:task signoff: true title: ${{ steps.update-go.outputs.commit-title }} - token: ${{ secrets.PAKT }} + token: ${{ secrets.PAT }} diff --git a/.github/workflows/pb-update-pipeline.yml b/.github/workflows/pb-update-pipeline.yml index 07bd890..4f592e4 100644 --- a/.github/workflows/pb-update-pipeline.yml +++ b/.github/workflows/pb-update-pipeline.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: "1.22" + go-version: "1.23" - name: Install octo run: | #!/usr/bin/env bash diff --git a/scripts/build.sh b/scripts/build.sh index 447e20f..11e6bd6 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,19 +1,19 @@ #!/usr/bin/env bash - set -euo pipefail -GOOS="linux" go build -ldflags='-s -w' -o bin/main github.com/initializ-buildpacks/procfile/v5/cmd/main -GOOS="windows" GOARCH="amd64" go build -ldflags='-s -w' -o bin/main.exe github.com/initializ-buildpacks/procfile/v5/cmd/main +GOMOD=$(head -1 go.mod | awk '{print $2}') +GOOS="linux" GOARCH="amd64" go build -ldflags='-s -w' -o linux/amd64/bin/main "$GOMOD/cmd/main" +GOOS="linux" GOARCH="arm64" go build -ldflags='-s -w' -o linux/arm64/bin/main "$GOMOD/cmd/main" if [ "${STRIP:-false}" != "false" ]; then - strip bin/main bin/main.exe + strip linux/amd64/bin/main linux/arm64/bin/main fi if [ "${COMPRESS:-none}" != "none" ]; then - $COMPRESS bin/main bin/main.exe + $COMPRESS linux/amd64/bin/main linux/arm64/bin/main fi -ln -fs main bin/build -ln -fs main bin/detect -ln -fs main.exe bin/build.exe -ln -fs main.exe bin/detect.exe +ln -fs main linux/amd64/bin/build +ln -fs main linux/arm64/bin/build +ln -fs main linux/amd64/bin/detect +ln -fs main linux/arm64/bin/detect \ No newline at end of file