Skip to content

Commit 1e44607

Browse files
authored
Merge pull request #145 from planetscale/joem/autotag-sha-pin
ci: pin autotag binary by version + sha256
2 parents 46779f7 + 05b72ba commit 1e44607

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎.github/workflows/release.yaml‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,18 @@ jobs:
6464
cache: false
6565

6666
- name: install autotag binary
67+
# To bump: update AUTOTAG_VERSION and fetch the new SHA from the release's
68+
# checksums.txt (autotag_<version>_checksums.txt, line matching 'autotag_linux_amd64$').
69+
env:
70+
AUTOTAG_VERSION: 1.4.3
71+
AUTOTAG_SHA256: 85e7ec97d732800bb838085fd3f2e19b2aa2ee3a8da0db7fd0aaf4113a279f3a
6772
run: |
68-
curl -sL https://git.io/autotag-install | sh -s -- -b "${RUNNER_TEMP}/bin"
73+
set -euo pipefail
74+
mkdir -p "${RUNNER_TEMP}/bin"
75+
curl -fsSLo "${RUNNER_TEMP}/bin/autotag" \
76+
"https://github.com/autotag-dev/autotag/releases/download/v${AUTOTAG_VERSION}/autotag_linux_amd64"
77+
echo "${AUTOTAG_SHA256} ${RUNNER_TEMP}/bin/autotag" | sha256sum -c -
78+
chmod +x "${RUNNER_TEMP}/bin/autotag"
6979
echo "${RUNNER_TEMP}/bin" >> $GITHUB_PATH
7080
7181
- name: Install GoReleaser

0 commit comments

Comments
 (0)