-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds ARM64 binaries & updates pipeline descriptor & workflows. It also updates the buildpack to download the tar gzip'd binaries. The unzipped binary is amd64 only, so to make it work with both amd64 and arm64 the easiest option is to download the archives instead. Signed-off-by: Daniel Mikusa <dan@mikusa.com>
- Loading branch information
Showing
13 changed files
with
176 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
name: Update jattach ARM64 | ||
"on": | ||
schedule: | ||
- cron: 0 5 * * 1-5 | ||
workflow_dispatch: {} | ||
jobs: | ||
update: | ||
name: Update Buildpack Dependency | ||
runs-on: | ||
- ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.20" | ||
- name: Install update-buildpack-dependency | ||
run: | | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
go install -ldflags="-s -w" github.com/paketo-buildpacks/libpak/cmd/update-buildpack-dependency@latest | ||
- name: Install yj | ||
run: | | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
echo "Installing yj ${YJ_VERSION}" | ||
mkdir -p "${HOME}"/bin | ||
echo "${HOME}/bin" >> "${GITHUB_PATH}" | ||
curl \ | ||
--location \ | ||
--show-error \ | ||
--silent \ | ||
--output "${HOME}"/bin/yj \ | ||
"https://github.com/sclevine/yj/releases/download/v${YJ_VERSION}/yj-linux-amd64" | ||
chmod +x "${HOME}"/bin/yj | ||
env: | ||
YJ_VERSION: 5.1.0 | ||
- uses: actions/checkout@v4 | ||
- id: dependency | ||
uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main | ||
with: | ||
glob: jattach-linux-arm64.tgz | ||
owner: apangin | ||
repository: jattach | ||
tag_filter: v([\d.]*) | ||
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} | ||
- name: Update Buildpack Dependency | ||
id: buildpack | ||
run: | | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
if [ -z "${ARCH}" ]; then | ||
ARCH="amd64" | ||
fi | ||
OLD_VERSION=$(yj -tj < buildpack.toml | \ | ||
jq -r ".metadata.dependencies[] | select( .id == env.ID ) | select( .version | test( env.VERSION_PATTERN ) ) | select( .purl | contains( env.ARCH ) ) | .version") | ||
update-buildpack-dependency \ | ||
--buildpack-toml buildpack.toml \ | ||
--id "${ID}" \ | ||
--arch "${ARCH}" \ | ||
--version-pattern "${VERSION_PATTERN}" \ | ||
--version "${VERSION}" \ | ||
--cpe-pattern "${CPE_PATTERN:-}" \ | ||
--cpe "${CPE:-}" \ | ||
--purl-pattern "${PURL_PATTERN:-}" \ | ||
--purl "${PURL:-}" \ | ||
--uri "${URI}" \ | ||
--sha256 "${SHA256}" \ | ||
--source "${SOURCE_URI}" \ | ||
--source-sha256 "${SOURCE_SHA256}" | ||
git add buildpack.toml | ||
git checkout -- . | ||
if [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $1}')" != "$(echo "$VERSION" | awk -F '.' '{print $1}')" ]; then | ||
LABEL="semver:major" | ||
elif [ "$(echo "$OLD_VERSION" | awk -F '.' '{print $2}')" != "$(echo "$VERSION" | awk -F '.' '{print $2}')" ]; then | ||
LABEL="semver:minor" | ||
else | ||
LABEL="semver:patch" | ||
fi | ||
echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT" | ||
echo "new-version=${VERSION}" >> "$GITHUB_OUTPUT" | ||
echo "version-label=${LABEL}" >> "$GITHUB_OUTPUT" | ||
env: | ||
ARCH: "" | ||
CPE: ${{ steps.dependency.outputs.cpe }} | ||
CPE_PATTERN: "" | ||
ID: jattach | ||
PURL: ${{ steps.dependency.outputs.purl }} | ||
PURL_PATTERN: "" | ||
SHA256: ${{ steps.dependency.outputs.sha256 }} | ||
SOURCE_SHA256: ${{ steps.dependency.outputs.source_sha256 }} | ||
SOURCE_URI: ${{ steps.dependency.outputs.source }} | ||
URI: ${{ steps.dependency.outputs.uri }} | ||
VERSION: ${{ steps.dependency.outputs.version }} | ||
VERSION_PATTERN: '[\d]+\.[\d]+\.[\d]+' | ||
- uses: peter-evans/create-pull-request@v5 | ||
with: | ||
author: ${{ secrets.JAVA_GITHUB_USERNAME }} <${{ secrets.JAVA_GITHUB_USERNAME }}@users.noreply.github.com> | ||
body: Bumps `jattach ARM64` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`. | ||
branch: update/buildpack/jattach-arm-64 | ||
commit-message: |- | ||
Bump jattach ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} | ||
Bumps jattach ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}. | ||
delete-branch: true | ||
labels: ${{ steps.buildpack.outputs.version-label }}, type:dependency-upgrade | ||
signoff: true | ||
title: Bump jattach ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} | ||
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
jattach/testdata/24d462459f142b1e1465eca49989cad4389d66d7167c6d5f5b2ac89502cec380.toml
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
jattach/testdata/24d462459f142b1e1465eca49989cad4389d66d7167c6d5f5b2ac89502cec380/jattach
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
jattach/testdata/61f13e4c60ad63295453a5e1c92e04ad34bab09871b622b5aac0e72236431000.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
uri = "https://localhost/jattach.tgz" | ||
sha256 = "61f13e4c60ad63295453a5e1c92e04ad34bab09871b622b5aac0e72236431000" |
Binary file added
BIN
+124 Bytes
...ach/testdata/61f13e4c60ad63295453a5e1c92e04ad34bab09871b622b5aac0e72236431000/jattach.tgz
Binary file not shown.