Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
20 lines
767 B
Bash
Executable File
20 lines
767 B
Bash
Executable File
#! /usr/bin/env nix-shell
|
|
#! nix-shell -I nixpkgs=./. -i bash -p coreutils common-updater-scripts jq curl
|
|
|
|
set -euo pipefail
|
|
|
|
currentVersion="$(nix --extra-experimental-features nix-command eval -f . github-runner.version --raw)"
|
|
latestVersion="$(curl -s -H "Accept: application/vnd.github.v3+json" \
|
|
${GITHUB_TOKEN:+ -H "Authorization: bearer $GITHUB_TOKEN"} \
|
|
"https://api.github.com/repos/actions/runner/releases/latest" | jq -r ".tag_name")"
|
|
latestVersion="${latestVersion#?}" # v2.296.2 -> 2.296.2
|
|
|
|
if [[ "$latestVersion" == "$currentVersion" ]]; then
|
|
echo "github-runner is already up to date: $currentVersion"
|
|
exit
|
|
fi
|
|
|
|
update-source-version github-runner "$latestVersion"
|
|
$(nix-build -A github-runner.fetch-deps --no-out-link)
|
|
|