Skip to content

Commit

Permalink
Merge pull request #178 from paketo-buildpacks/arm64
Browse files Browse the repository at this point in the history
Add ARM64 binaries
  • Loading branch information
dmikusa authored Jan 23, 2024
2 parents 15c9710 + 10113c1 commit 0fae787
Show file tree
Hide file tree
Showing 4 changed files with 157 additions and 15 deletions.
13 changes: 12 additions & 1 deletion .github/pipeline-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,16 @@ dependencies:
glob: watchexec-.+-x86_64-unknown-linux-musl.tar.xz
owner: watchexec
repository: watchexec
tag_filter: cli-v(1.*)
tag_filter: v(1.*)
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}

# ARM64
- name: Watchexec CLI ARM64
id: watchexec
uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
with:
glob: watchexec-.+-aarch64-unknown-linux-musl.tar.xz
owner: watchexec
repository: watchexec
tag_filter: v(1.*)
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
121 changes: 121 additions & 0 deletions .github/workflows/pb-update-watchexec-cli-arm-64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: Update Watchexec CLI 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: watchexec-.+-aarch64-unknown-linux-musl.tar.xz
owner: watchexec
repository: watchexec
tag_filter: v(1.*)
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: watchexec
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 `Watchexec CLI ARM64` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`.
branch: update/buildpack/watchexec-cli-arm-64
commit-message: |-
Bump Watchexec CLI ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
Bumps Watchexec CLI 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 Watchexec CLI ARM64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }}
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/pb-update-watchexec-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
glob: watchexec-.+-x86_64-unknown-linux-musl.tar.xz
owner: watchexec
repository: watchexec
tag_filter: cli-v(1.*)
tag_filter: v(1.*)
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
- name: Update Buildpack Dependency
id: buildpack
Expand Down
36 changes: 23 additions & 13 deletions buildpack.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018-2021 the original author or authors.
# Copyright 2018-2024 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,26 +32,36 @@ api = "0.7"
pre-package = "scripts/build.sh"

[[metadata.dependencies]]
cpes = ["cpe:2.3:a:watchexec:watchexec:1.20.5:*:*:*:*:*:*:*"]
cpes = ["cpe:2.3:a:watchexec:watchexec:1.25.1:*:*:*:*:*:*:*"]
id = "watchexec"
name = "Watchexec"
purl = "pkg:generic/watchexec@1.20.5?arch=amd64"
sha256 = "33e091870736833b77b103a8e7268c0ae66d756b8d71203405353eb9d40774f2"
source = "https://github.com/watchexec/watchexec/archive/refs/tags/cli-v1.20.5.tar.gz"
source-sha256 = "2bc04c7ecf58d34a48c3eeea54a76b7e621717cb93305497bea2f6399dd119c6"
stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"]
uri = "https://github.com/watchexec/watchexec/releases/download/cli-v1.20.5/watchexec-1.20.5-x86_64-unknown-linux-musl.tar.xz"
version = "1.20.5"
purl = "pkg:generic/watchexec@1.25.1?arch=amd64"
sha256 = "f120752ae92a579d40956ebf527fba8cf8a953718b669d1e446ee072cbfd0bd5"
source = "https://github.com/watchexec/watchexec/archive/refs/tags/v1.25.1.tar.gz"
source-sha256 = "9609163c14cd49ec651562838f38b88ed2d370e354af312ddc78c2be76c08d37"
stacks = ["*"]
uri = "https://github.com/watchexec/watchexec/releases/download/v1.25.1/watchexec-1.25.1-x86_64-unknown-linux-musl.tar.xz"
version = "1.25.1"

[[metadata.dependencies.licenses]]
type = "Apache-2.0"
uri = "https://github.com/watchexec/watchexec/blob/main/LICENSE"

[[stacks]]
id = "io.buildpacks.stacks.bionic"
[[metadata.dependencies]]
cpes = ["cpe:2.3:a:watchexec:watchexec:1.25.1:*:*:*:*:*:*:*"]
id = "watchexec"
name = "Watchexec"
purl = "pkg:generic/[email protected]?arch=arm64"
sha256 = "e235f2c326122e108dc2c491252487aa596fe4894a1194f7c6dd0b6f728738bb"
source = "https://github.com/watchexec/watchexec/archive/refs/tags/v1.25.1.tar.gz"
source-sha256 = "9609163c14cd49ec651562838f38b88ed2d370e354af312ddc78c2be76c08d37"
stacks = ["*"]
uri = "https://github.com/watchexec/watchexec/releases/download/v1.25.1/watchexec-1.25.1-aarch64-unknown-linux-musl.tar.xz"
version = "1.25.1"

[[stacks]]
id = "io.paketo.stacks.tiny"
[[metadata.dependencies.licenses]]
type = "Apache-2.0"
uri = "https://github.com/watchexec/watchexec/blob/main/LICENSE"

[[stacks]]
id = "*"

0 comments on commit 0fae787

Please sign in to comment.