Compare commits

...

21 Commits

Author SHA1 Message Date
Taiki Endo
7f737c1056 Release 2.42.23 2024-08-13 06:45:47 +09:00
Taiki Endo
44a62c1085 Update wasmtime@latest to 23.0.2 2024-08-13 06:14:38 +09:00
Taiki Endo
66b16da49c codegen: Use LazyLock again 2024-08-12 05:02:13 +09:00
Taiki Endo
c995477ff1 Update TOOLS.md 2024-08-12 04:35:43 +09:00
Taiki Endo
abb8763b52 Simplify script in DEVELOPMENT.md 2024-08-12 04:32:15 +09:00
Taiki Endo
e1d57be4e5 Use here-string for shasum 2024-08-12 04:31:50 +09:00
Taiki Endo
8abecff737 Fix typos in logs 2024-08-12 04:27:46 +09:00
Taiki Endo
0b99f81025 ci: Re-enable opensuse containers tests
This reverts a43f23de26.
2024-08-12 04:27:19 +09:00
Taiki Endo
1f2c038e5d Retry on apk add failure 2024-08-12 04:26:20 +09:00
Taiki Endo
8efaa9bb37 Release 2.42.22 2024-08-10 20:34:45 +09:00
Taiki Endo
ea794731ca Update cargo-careful@latest to 0.4.3 2024-08-10 20:34:24 +09:00
Taiki Endo
14b956ff16 Release 2.42.21 2024-08-10 19:02:20 +09:00
Taiki Endo
22a2601a6f Update cargo-binstall@latest to 1.10.0 2024-08-10 18:14:09 +09:00
Taiki Endo
d999ed5c70 Update syft@latest to 1.11.0 2024-08-10 03:12:29 +09:00
Taiki Endo
91ca22ecbd Release 2.42.20 2024-08-08 22:11:45 +09:00
Taiki Endo
c30f951232 Update cargo-hack@latest to 0.6.31 2024-08-08 22:10:51 +09:00
Taiki Endo
ada21a86dc Release 2.42.19 2024-08-07 21:24:46 +09:00
Taiki Endo
bb8c47a10f Update osv-scanner@latest to 1.8.3 2024-08-07 15:15:49 +09:00
Taiki Endo
d79dff4773 Release 2.42.18 2024-08-05 21:37:26 +09:00
Taiki Endo
fc6ea98761 Update cargo-tarpaulin@latest to 0.31.1 2024-08-05 21:14:51 +09:00
Taiki Endo
3722252eee Update cargo-deny@latest to 0.16.1 2024-08-05 21:14:51 +09:00
16 changed files with 272 additions and 72 deletions

View File

@@ -132,18 +132,17 @@ jobs:
- debian:10-slim # glibc 2.28
- debian:11-slim # glibc 2.31
- debian:12-slim # glibc 2.36
- fedora:latest # glibc 2.38 (as of fedora 39)
- fedora:latest # glibc 2.39 (as of fedora 40)
- almalinux:8 # glibc 2.28
- almalinux:8-minimal # glibc 2.28
- almalinux:9 # glibc 2.34
- almalinux:9-minimal # glibc 2.34
- centos:6 # glibc 2.12
- centos:7 # glibc 2.17
# TODO: broken: Repository 'Update repository of openSUSE Backports' is invalid.
# - opensuse/leap:latest # glibc 2.31 (as of leap 15.5)
# - opensuse/tumbleweed:latest # glibc 2.39 (as of 2024-04-18)
- archlinux:latest # glibc 2.38 (as of 2024-04-18)
- alpine:latest # musl 1.2.4 (as of alpine 3.19)
- opensuse/leap:latest # glibc 2.38 (as of leap 15.6)
- opensuse/tumbleweed:latest # glibc 2.39 (as of 2024-07-19)
- archlinux:latest # glibc 2.39 (as of 2024-07-19)
- alpine:latest # musl 1.2.5 (as of alpine 3.20)
runs-on: ubuntu-latest
timeout-minutes: 60
container: ${{ matrix.container }}

View File

@@ -10,6 +10,34 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
## [Unreleased]
## [2.42.23] - 2024-08-12
- Update `wasmtime@latest` to 23.0.2.
## [2.42.22] - 2024-08-10
- Update `cargo-careful@latest` to 0.4.3.
## [2.42.21] - 2024-08-10
- Update `cargo-binstall@latest` to 1.10.0.
- Update `syft@latest` to 1.11.0.
## [2.42.20] - 2024-08-08
- Update `cargo-hack@latest` to 0.6.31.
## [2.42.19] - 2024-08-07
- Update `osv-scanner@latest` to 1.8.3.
## [2.42.18] - 2024-08-05
- Update `cargo-tarpaulin@latest` to 0.31.1.
- Update `cargo-deny@latest` to 0.16.1.
## [2.42.17] - 2024-08-04
- Update `knope@latest` to 0.17.0.
@@ -2566,7 +2594,13 @@ Note: This release is considered a breaking change because installing on version
Initial release
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.42.17...HEAD
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.42.23...HEAD
[2.42.23]: https://github.com/taiki-e/install-action/compare/v2.42.22...v2.42.23
[2.42.22]: https://github.com/taiki-e/install-action/compare/v2.42.21...v2.42.22
[2.42.21]: https://github.com/taiki-e/install-action/compare/v2.42.20...v2.42.21
[2.42.20]: https://github.com/taiki-e/install-action/compare/v2.42.19...v2.42.20
[2.42.19]: https://github.com/taiki-e/install-action/compare/v2.42.18...v2.42.19
[2.42.18]: https://github.com/taiki-e/install-action/compare/v2.42.17...v2.42.18
[2.42.17]: https://github.com/taiki-e/install-action/compare/v2.42.16...v2.42.17
[2.42.16]: https://github.com/taiki-e/install-action/compare/v2.42.15...v2.42.16
[2.42.15]: https://github.com/taiki-e/install-action/compare/v2.42.14...v2.42.15

View File

@@ -17,8 +17,8 @@ See JSON files in `tools/codegen/base` directory for examples of the manifest.
> If you're having problem with github api rate limit, you can use your GITHUB_TOKEN to increase the rate limit.
> If you have `Github CLI` installed (the command `gh`), you can:
>
> ```shell
> GITHUB_TOKEN=$(gh auth status --show-token 2>&1 | sed -n 's/^.*Token: \(.*\)$/\1/p') ./tools/manifest.sh <tool>
> ```sh
> GITHUB_TOKEN=$(gh auth status --show-token 2>&1 | sed -n 's/^.*Token: //p') ./tools/manifest.sh <tool>
> ```
## Refresh TOOLS.md

View File

@@ -45,6 +45,7 @@ See the [Supported tools section in README.md](README.md#supported-tools) for ho
| [**hyperfine**](https://github.com/sharkdp/hyperfine) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/sharkdp/hyperfine/releases) | Linux, macOS, Windows | [MIT](https://github.com/sharkdp/hyperfine/blob/master/LICENSE-MIT) OR [Apache-2.0](https://github.com/sharkdp/hyperfine/blob/master/LICENSE-APACHE) |
| [**jaq**](https://github.com/01mf02/jaq) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/01mf02/jaq/releases) | Linux, macOS, Windows | [MIT](https://github.com/01mf02/jaq/blob/main/LICENSE-MIT) |
| [**just**](https://github.com/casey/just) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/casey/just/releases) | Linux, macOS, Windows | [CC0-1.0](https://github.com/casey/just/blob/master/LICENSE) |
| [**knope**](https://github.com/knope-dev/knope) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/knope-dev/knope/releases) | Linux, macOS, Windows | [MIT](https://github.com/knope-dev/knope/blob/main/LICENSE) |
| [**mdbook**](https://github.com/rust-lang/mdBook) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/rust-lang/mdBook/releases) | Linux, macOS, Windows | [MPL-2.0](https://github.com/rust-lang/mdBook/blob/master/LICENSE) |
| [**mdbook-linkcheck**](https://github.com/Michael-F-Bryan/mdbook-linkcheck) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases) | Linux, macOS, Windows | [MIT](https://github.com/Michael-F-Bryan/mdbook-linkcheck/blob/master/LICENSE) |
| [**osv-scanner**](https://github.com/google/osv-scanner) | `$HOME/.install-action/bin` | [GitHub Releases](https://github.com/google/osv-scanner/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/google/osv-scanner/blob/main/LICENSE) |

View File

@@ -25,7 +25,7 @@ runs:
set -eu
if ! command -v bash >/dev/null; then
if grep -Eq '^ID=alpine' /etc/os-release; then
printf '::group::Install packages required for checkout-action (bash)\n'
printf '::group::Install packages required for install-action (bash)\n'
# NB: sync with apk_install in main.sh
if command -v sudo >/dev/null; then
sudo apk --no-cache add bash
@@ -36,7 +36,7 @@ runs:
fi
printf '::endgroup::\n'
else
printf '::error::checkout-action requires bash\n'
printf '::error::install-action requires bash\n'
exit 1
fi
fi

10
main.sh
View File

@@ -49,11 +49,11 @@ download_and_checksum() {
if [[ -n "${checksum}" ]]; then
info "verifying sha256 checksum for $(basename "${url}")"
if type -P sha256sum &>/dev/null; then
echo "${checksum} *tmp" | sha256sum -c - >/dev/null
sha256sum -c - >/dev/null <<<"${checksum} *tmp"
elif type -P shasum &>/dev/null; then
# GitHub-hosted macOS runner does not install GNU Coreutils by default.
# https://github.com/actions/runner-images/issues/90
echo "${checksum} *tmp" | shasum -a 256 -c - >/dev/null
shasum -a 256 -c - >/dev/null <<<"${checksum} *tmp"
else
bail "checksum requires 'sha256sum' or 'shasum' command; consider installing one of them or setting 'checksum' input option to 'false'"
fi
@@ -367,11 +367,11 @@ pacman_install() {
}
apk_install() {
if type -P sudo &>/dev/null; then
sudo apk --no-cache add "$@"
retry sudo apk --no-cache add "$@"
elif type -P doas &>/dev/null; then
doas apk --no-cache add "$@"
retry doas apk --no-cache add "$@"
else
apk --no-cache add "$@"
retry apk --no-cache add "$@"
fi
}
sys_install() {

View File

@@ -22,32 +22,32 @@
},
"license_markdown": "[GPL-3.0](https://github.com/cargo-bins/cargo-binstall/blob/HEAD/crates/bin/LICENSE)",
"latest": {
"version": "1.9.0"
"version": "1.10.0"
},
"1.9.0": {
"1.10.0": {
"x86_64_linux_musl": {
"etag": "0x8DCB4494FF3C6C7",
"checksum": "a221c12c5b9e4dcdb3b05f3d309287874a04ed9dd782f625f1531baca265d2d9"
"etag": "0x8DCB9185281E8CE",
"checksum": "25e1f5eb019b06f273207c6dd1e2b7ac36b86660d2cd740e152cb99e33715178"
},
"x86_64_macos": {
"etag": "0x8DCB448FD384AE3",
"checksum": "8a0d8ac04af68a123fc053caca7d574550c0d5ba437f84fc38f594aeb1ca62fe"
"etag": "0x8DCB91807B7C5DD",
"checksum": "8ab17e8037ea697f25c8ce6a4e5d05f55fed98ad27e44e69916b21ab576dc253"
},
"x86_64_windows": {
"etag": "0x8DCB44A40642CF0",
"checksum": "2c95a202d983352b355b5676aa20fc27a3fd7d5e0f9b0ea84a5bfa9d9ea8e890"
"etag": "0x8DCB918FC8D1D60",
"checksum": "f880eb5f96f2221e1d5f42072e64aba0df11eca64d12a50277afddbfe10ceb8d"
},
"aarch64_linux_musl": {
"etag": "0x8DCB449138E90AF",
"checksum": "ee6f7594ba854e660fb5f332e034b5000a23662500be25a4a40cc70be3feeac9"
"etag": "0x8DCB918038BEDE5",
"checksum": "a7bfc49f91e31a03ff09ed6e8f8eb2cefe414dd357c5d057713e80afd4d7bb0a"
},
"aarch64_macos": {
"etag": "0x8DCB449495B2F4D",
"checksum": "fba22b9d9783521aa2454398ec395a1a6c9d0c02cbcbeb80760893928debe5d2"
"etag": "0x8DCB91842167176",
"checksum": "d5fc3006c6bf7d0f9d7f7f32fd1b0fedec6da834273d5098dea309b501ace1ce"
},
"aarch64_windows": {
"etag": "0x8DCB449C84B7EE4",
"checksum": "b89fd7a145b1be5d0165307d27bdcc1e890db2ffbc4dd0cfbccfdda0fd2b5946"
"etag": "0x8DCB918DAF9CEAF",
"checksum": "1018864440e32a4053f8134e88623519bee969538acc4bc177d683f86215d531"
}
}
}

View File

@@ -13,10 +13,24 @@
},
"license_markdown": "[MIT](https://github.com/RalfJung/cargo-careful/blob/master/LICENSE-MIT) OR [Apache-2.0](https://github.com/RalfJung/cargo-careful/blob/master/LICENSE-APACHE)",
"latest": {
"version": "0.4.2"
"version": "0.4.3"
},
"0.4": {
"version": "0.4.2"
"version": "0.4.3"
},
"0.4.3": {
"x86_64_linux_musl": {
"etag": "0x8DCB92F10570A48",
"checksum": "8a39c7c88744b7dec49fdedd08588e75343aabd466c9ec811832b65680c64e6d"
},
"x86_64_macos": {
"etag": "0x8DCB92F104F71BD",
"checksum": "c4d1b19bc243bd1d8ed5d99413d9a625b852e394e614b7871d71deb9557940e9"
},
"x86_64_windows": {
"etag": "0x8DCB92F104F4AD5",
"checksum": "1a3bb682553c48cef478609a377e8f845929efad8c4c903ae4ad66348ac5b0c3"
}
},
"0.4.2": {
"x86_64_linux_musl": {

View File

@@ -24,10 +24,32 @@
},
"license_markdown": "[MIT](https://github.com/EmbarkStudios/cargo-deny/blob/main/LICENSE-MIT) OR [Apache-2.0](https://github.com/EmbarkStudios/cargo-deny/blob/main/LICENSE-APACHE)",
"latest": {
"version": "0.16.0"
"version": "0.16.1"
},
"0.16": {
"version": "0.16.0"
"version": "0.16.1"
},
"0.16.1": {
"x86_64_linux_musl": {
"etag": "0x8DCB53F645CB8D4",
"checksum": "9612f02c85effbc97924c91e1e5b20eb51e48206e2627abb80a8f1b152ac0103"
},
"x86_64_macos": {
"etag": "0x8DCB53F7E1FD62D",
"checksum": "74e0da17be6d25c09a6a8038147ff498e92a75667c654fc39c9cc5bbd68ac842"
},
"x86_64_windows": {
"etag": "0x8DCB53FC4A35306",
"checksum": "fe69a1481510c51bfca78c26927c8d64476ae8c46f4abc0629a197a34500fed8"
},
"aarch64_linux_musl": {
"etag": "0x8DCB53F708123D3",
"checksum": "3df23bbdc19f5bf12284cbebde70f8d00587fe416c1fdd92dd1bee858d6bfada"
},
"aarch64_macos": {
"etag": "0x8DCB53F449AEB60",
"checksum": "9336a1582c43b091c38950c9ebb5fdce7248fa8ce6ad30a65048779ac61f50a1"
}
},
"0.16.0": {
"x86_64_linux_musl": {

View File

@@ -3,10 +3,42 @@
"template": null,
"license_markdown": "[Apache-2.0](https://github.com/taiki-e/cargo-hack/blob/main/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-hack/blob/main/LICENSE-MIT)",
"latest": {
"version": "0.6.30"
"version": "0.6.31"
},
"0.6": {
"version": "0.6.30"
"version": "0.6.31"
},
"0.6.31": {
"x86_64_linux_musl": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.31/cargo-hack-x86_64-unknown-linux-musl.tar.gz",
"etag": "0x8DCB7A9CB75CB85",
"checksum": "b5e17ff9ad0224af30af1e1e8d27fef1010c7fda58048a12c704ffb2675b6ad6"
},
"x86_64_macos": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.31/cargo-hack-x86_64-apple-darwin.tar.gz",
"etag": "0x8DCB7A9E485B392",
"checksum": "2d935eafc5082eb19dc33b123bac7ca898109bb0ca7a8ab7de19c44b4d5317a0"
},
"x86_64_windows": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.31/cargo-hack-x86_64-pc-windows-msvc.tar.gz",
"etag": "0x8DCB7AA01F78A70",
"checksum": "5f56c408db441437830e6ef91eda64187880821fe54f455a956f9397443ff034"
},
"aarch64_linux_musl": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.31/cargo-hack-aarch64-unknown-linux-musl.tar.gz",
"etag": "0x8DCB7A9BA4B08FA",
"checksum": "435bb927b1db4d45a4807e1857aa662e1fa0715c8402da7ac56f713cc904aff7"
},
"aarch64_macos": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.31/cargo-hack-aarch64-apple-darwin.tar.gz",
"etag": "0x8DCB7A9D355C7A8",
"checksum": "ecd866a64c1cd14e90cc4670ec466f0c0408d86aa53cd9ca2d1cae42da4a7ffd"
},
"aarch64_windows": {
"url": "https://github.com/taiki-e/cargo-hack/releases/download/v0.6.31/cargo-hack-aarch64-pc-windows-msvc.tar.gz",
"etag": "0x8DCB7AA071F6D09",
"checksum": "a986372c14989387dab85aafc55bc36ee1959cec2a270447b132de7f75905802"
}
},
"0.6.30": {
"x86_64_linux_musl": {

View File

@@ -19,10 +19,32 @@
},
"license_markdown": "[MIT](https://github.com/xd009642/tarpaulin/blob/develop/LICENSE-MIT) OR [Apache-2.0](https://github.com/xd009642/tarpaulin/blob/develop/LICENSE-APACHE)",
"latest": {
"version": "0.31.0"
"version": "0.31.1"
},
"0.31": {
"version": "0.31.0"
"version": "0.31.1"
},
"0.31.1": {
"x86_64_linux_musl": {
"etag": "0x8DCB542DB224D2C",
"checksum": "d49898d65162ca77b1ae227a033f2d155758db6069fe4caf816cfa15ed8e63f0"
},
"x86_64_macos": {
"etag": "0x8DCB542AFB6A91A",
"checksum": "5c69e5b2fac580279ecf9c5e8c682e2c57d81fd0556137606d6ddf938ddd2972"
},
"x86_64_windows": {
"etag": "0x8DCB542E7194CF8",
"checksum": "71612269548eec15853fb0845189d3888848a4b2beb3424f923b2d36801ad2c9"
},
"aarch64_linux_musl": {
"etag": "0x8DCB542AFFB7AE9",
"checksum": "a3a5a52eb74d51cb477f30c1c7b81909ebb4f5897cf46794463bf65ca933e013"
},
"aarch64_macos": {
"etag": "0x8DCB5424EF51919",
"checksum": "a21e355cf84e7cf5f0f0a0dc9d1537cac12ba62fd09385b2a1650b7d9c3e3077"
}
},
"0.31.0": {
"x86_64_linux_musl": {

View File

@@ -3,13 +3,45 @@
"template": null,
"license_markdown": "[Apache-2.0](https://github.com/google/osv-scanner/blob/main/LICENSE)",
"latest": {
"version": "1.8.2"
"version": "1.8.3"
},
"1": {
"version": "1.8.2"
"version": "1.8.3"
},
"1.8": {
"version": "1.8.2"
"version": "1.8.3"
},
"1.8.3": {
"x86_64_linux_musl": {
"url": "https://github.com/google/osv-scanner/releases/download/v1.8.3/osv-scanner_linux_amd64",
"etag": "0x8DCB69A5EDA9989",
"checksum": "ddb3d48ae920a7bb711ed7c1971ec51cb8cc0256c95965bd1422b2dfe4bece47"
},
"x86_64_macos": {
"url": "https://github.com/google/osv-scanner/releases/download/v1.8.3/osv-scanner_darwin_amd64",
"etag": "0x8DCB69A5F7016C9",
"checksum": "98319f3c491d0b0baa6b3ac64c53061fa76060795ccf034bd4f1cd9fad453df0"
},
"x86_64_windows": {
"url": "https://github.com/google/osv-scanner/releases/download/v1.8.3/osv-scanner_windows_amd64.exe",
"etag": "0x8DCB69A5F987FE7",
"checksum": "96a3a312ce02ffed2694b532a7d8047bf6ddeab58179a794755aeddda5f9c1ce"
},
"aarch64_linux_musl": {
"url": "https://github.com/google/osv-scanner/releases/download/v1.8.3/osv-scanner_linux_arm64",
"etag": "0x8DCB69A5EDBA9D6",
"checksum": "809673169f6d4155c7b86a53b517b93d5644b2ba798d30bca0d648dd266513da"
},
"aarch64_macos": {
"url": "https://github.com/google/osv-scanner/releases/download/v1.8.3/osv-scanner_darwin_arm64",
"etag": "0x8DCB69A5EBA3DAE",
"checksum": "e4c02524829546055e3b0675f76c9bdcb7bd5a1a4f1983e4aa6c86b1192aeea8"
},
"aarch64_windows": {
"url": "https://github.com/google/osv-scanner/releases/download/v1.8.3/osv-scanner_windows_arm64.exe",
"etag": "0x8DCB69A5ECDFD9A",
"checksum": "6973d9f7a4016b611f012301a4e1fbb04bb3c6349cd6b560851e5e7c88bcdfbc"
}
},
"1.8.2": {
"x86_64_linux_musl": {

29
manifests/syft.json generated
View File

@@ -24,10 +24,35 @@
},
"license_markdown": "[Apache-2.0](https://github.com/anchore/syft/blob/main/LICENSE)",
"latest": {
"version": "1.10.0"
"version": "1.11.0"
},
"1": {
"version": "1.10.0"
"version": "1.11.0"
},
"1.11": {
"version": "1.11.0"
},
"1.11.0": {
"x86_64_linux_musl": {
"etag": "0x8DCB89D2402EC9D",
"checksum": "0a61e5ef09f88562a35b6ec5dd27fa77f19c8611c26e58d527c4da191736b472"
},
"x86_64_macos": {
"etag": "0x8DCB89D24C1BC37",
"checksum": "34532f1b858e0ead13230c78e61158faacac4dbb1ed57f4da4622c738be7a691"
},
"x86_64_windows": {
"etag": "0x8DCB89D24C0ABE8",
"checksum": "56a187682873f2644d9b5f9ec07b8476c6257244b5f7a9c23d4c49c1d7f6e11a"
},
"aarch64_linux_musl": {
"etag": "0x8DCB89D24092728",
"checksum": "10de71da67132e41dad43a9ceea1f816e5fe3bc19feda2d5b0d33c08abc03668"
},
"aarch64_macos": {
"etag": "0x8DCB89D247D85E6",
"checksum": "704904af8325b9ebfb7633b44221e148cb42215718ec64c8f9450fd94354db89"
}
},
"1.10": {
"version": "1.10.0"

View File

@@ -24,13 +24,35 @@
},
"license_markdown": "[Apache-2.0 WITH LLVM-exception](https://github.com/bytecodealliance/wasmtime/blob/main/LICENSE)",
"latest": {
"version": "23.0.1"
"version": "23.0.2"
},
"23": {
"version": "23.0.1"
"version": "23.0.2"
},
"23.0": {
"version": "23.0.1"
"version": "23.0.2"
},
"23.0.2": {
"x86_64_linux_gnu": {
"etag": "0x8DCBAFB6BC03CF7",
"checksum": "78708a332c97ec764515f93ae480f5b31abb167b7c534817ce282a8571e0c426"
},
"x86_64_macos": {
"etag": "0x8DCBAFB6CB96324",
"checksum": "3f43858533e730dcb36304665622362bd91479f2ac8ffdbae95c7ca91d41d038"
},
"x86_64_windows": {
"etag": "0x8DCBAFB700EB903",
"checksum": "fab87dbb0a104b0e25dc4dbf10f1a856ab30079371b4b68d024e3f15a79c48c7"
},
"aarch64_linux_gnu": {
"etag": "0x8DCBAFB657DA1DE",
"checksum": "54edf90126a58dc7fe269fb25699346242e8648fc9a414011432e29415d2e52b"
},
"aarch64_macos": {
"etag": "0x8DCBAFB6661D0FF",
"checksum": "dcfe805271e8872e3025f3bfc1404de6efa13ad87fe9132ff8d27aa42caf7068"
}
},
"23.0.1": {
"x86_64_linux_gnu": {

View File

@@ -7,7 +7,7 @@ use std::{
ffi::OsStr,
io::Read,
path::Path,
sync::{OnceLock, RwLock},
sync::{LazyLock, RwLock},
time::Duration,
};
@@ -649,43 +649,38 @@ struct GitHubTokens {
other: RwLock<Option<String>>,
}
impl GitHubTokens {
// TODO: Use std::sync::LazyLock once 1.80 is released
fn get_github_tokens() -> &'static GitHubTokens {
static GITHUB_TOKENS: OnceLock<GitHubTokens> = OnceLock::new();
GITHUB_TOKENS.get_or_init(|| {
let token = env::var("GITHUB_TOKEN").ok().filter(|v| !v.is_empty());
GitHubTokens {
raw: RwLock::new(token.clone()),
api: RwLock::new(token.clone()),
other: RwLock::new(token),
}
})
}
fn get(url: &str) -> Option<String> {
fn get(&self, url: &str) -> Option<String> {
if url.starts_with("https://raw.githubusercontent.com/") {
Self::get_github_tokens().raw.read().unwrap().clone()
self.raw.read().unwrap().clone()
} else if url.starts_with("https://api.github.com/") {
Self::get_github_tokens().api.read().unwrap().clone()
self.api.read().unwrap().clone()
} else if url.starts_with("https://github.com/") {
Self::get_github_tokens().other.read().unwrap().clone()
self.other.read().unwrap().clone()
} else {
None
}
}
fn clear(url: &str) {
fn clear(&self, url: &str) {
if url.starts_with("https://raw.githubusercontent.com/") {
*Self::get_github_tokens().raw.write().unwrap() = None;
*self.raw.write().unwrap() = None;
} else if url.starts_with("https://api.github.com/") {
*Self::get_github_tokens().api.write().unwrap() = None;
*self.api.write().unwrap() = None;
} else if url.starts_with("https://github.com/") {
*Self::get_github_tokens().other.write().unwrap() = None;
*self.other.write().unwrap() = None;
}
}
}
static GITHUB_TOKENS: LazyLock<GitHubTokens> = LazyLock::new(|| {
let token = env::var("GITHUB_TOKEN").ok().filter(|v| !v.is_empty());
GitHubTokens {
raw: RwLock::new(token.clone()),
api: RwLock::new(token.clone()),
other: RwLock::new(token),
}
});
fn download(url: &str) -> Result<ureq::Response> {
let mut token = GitHubTokens::get(url);
let mut token = GITHUB_TOKENS.get(url);
let mut retry = 0;
let mut retry_time = 0;
let mut max_retry = 6;
@@ -707,7 +702,7 @@ fn download(url: &str) -> Result<ureq::Response> {
retry_time = 0;
token = None;
// rate limit
GitHubTokens::clear(url);
GITHUB_TOKENS.clear(url);
}
retry += 1;
if retry > max_retry {
@@ -721,7 +716,7 @@ fn download(url: &str) -> Result<ureq::Response> {
fn github_head(url: &str) -> Result<()> {
eprintln!("fetching head of {url} ..");
let mut token = GitHubTokens::get(url);
let mut token = GITHUB_TOKENS.get(url);
let mut retry = 0;
let mut retry_time = 0;
let mut max_retry = 2;
@@ -744,7 +739,7 @@ fn github_head(url: &str) -> Result<()> {
if token.is_some() && retry == max_retry / 2 {
retry_time = 0;
token = None;
GitHubTokens::clear(url);
GITHUB_TOKENS.clear(url);
}
retry += 1;
if retry > max_retry {

View File

@@ -12,6 +12,8 @@ This is a list of tools that are installed from manifests managed in this action
If a tool not included in the list below is specified, this action uses [cargo-binstall] as a fallback.
See the [Supported tools section in README.md](README.md#supported-tools) for how to ensure that fallback is not used.
> If `$CARGO_HOME/bin` is not available, Rust-related binaries will be installed to `$HOME/.cargo/bin`.<br>
> If `$HOME/.cargo/bin` is not available, Rust-related binaries will be installed to `$HOME/.install-action/bin`.<br>