-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Watchexec & add ARM64 binaries
Signed-off-by: Daniel Mikusa <[email protected]>
- Loading branch information
Showing
4 changed files
with
147 additions
and
10 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,118 @@ | ||
name: Update Watchexec CLI AMD64 | ||
"on": | ||
schedule: | ||
- cron: 0 5 * * 1-5 | ||
workflow_dispatch: {} | ||
jobs: | ||
update: | ||
name: Update Buildpack Dependency | ||
runs-on: | ||
- ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v4 | ||
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" | ||
chmod +x "${HOME}"/bin/yj | ||
env: | ||
YJ_VERSION: 5.0.0 | ||
- uses: actions/checkout@v3 | ||
- 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 | ||
OLD_VERSION=$(yj -tj < buildpack.toml | jq -r " | ||
.metadata.dependencies[] | | ||
select( .id == env.ID ) | | ||
select( .version | test( env.VERSION_PATTERN ) ) | | ||
.version") | ||
update-buildpack-dependency \ | ||
--buildpack-toml buildpack.toml \ | ||
--id "${ID}" \ | ||
--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: | ||
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 AMD64` from `${{ steps.buildpack.outputs.old-version }}` to `${{ steps.buildpack.outputs.new-version }}`. | ||
branch: update/buildpack/watchexec-cli-amd-64 | ||
commit-message: |- | ||
Bump Watchexec CLI AMD64 from ${{ steps.buildpack.outputs.old-version }} to ${{ steps.buildpack.outputs.new-version }} | ||
Bumps Watchexec CLI AMD64 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 AMD64 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,22 +36,32 @@ api = "0.7" | |
id = "watchexec" | ||
name = "Watchexec" | ||
purl = "pkg:generic/[email protected]?arch=amd64" | ||
source = "https://github.com/watchexec/watchexec/archive/refs/tags/v1.23.0.tar.gz" | ||
source-sha256 = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" | ||
stacks = ["*"] | ||
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" | ||
version = "1.23.0" | ||
|
||
[[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.20.5:*:*:*:*:*:*:*"] | ||
id = "watchexec" | ||
name = "Watchexec" | ||
purl = "pkg:generic/[email protected]?arch=arm64" | ||
source = "https://github.com/watchexec/watchexec/archive/refs/tags/v1.23.0.tar.gz" | ||
source-sha256 = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" | ||
stacks = ["*"] | ||
uri = "https://github.com/watchexec/watchexec/releases/download/v1.23.0/watchexec-1.23.0-aarch64-unknown-linux-musl.tar.xz" | ||
sha256 = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" | ||
version = "1.23.0" | ||
|
||
[[stacks]] | ||
id = "io.paketo.stacks.tiny" | ||
[[metadata.dependencies.licenses]] | ||
type = "Apache-2.0" | ||
uri = "https://github.com/watchexec/watchexec/blob/main/LICENSE" | ||
|
||
[[stacks]] | ||
id = "*" |