mirror of
https://github.com/taiki-e/install-action.git
synced 2026-04-18 20:02:36 +08:00
Support cargo-deb
This commit is contained in:
@@ -10,6 +10,8 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
- Support `cargo-deb`. ([#1669](https://github.com/taiki-e/install-action/pull/1669))
|
||||||
|
|
||||||
## [2.73.0] - 2026-04-05
|
## [2.73.0] - 2026-04-05
|
||||||
|
|
||||||
- Introduce [dependency cooldown](https://blog.yossarian.net/2025/11/21/We-should-all-be-using-dependency-cooldowns) when installing with `taiki-e/install-action@<tool_name>`, `tool: <tool_name>@latest`, or `tool: <tool_name>@<omitted_version>` to mitigate the risk of supply chain attacks by default. ([#1666](https://github.com/taiki-e/install-action/pull/1666))
|
- Introduce [dependency cooldown](https://blog.yossarian.net/2025/11/21/We-should-all-be-using-dependency-cooldowns) when installing with `taiki-e/install-action@<tool_name>`, `tool: <tool_name>@latest`, or `tool: <tool_name>@<omitted_version>` to mitigate the risk of supply chain attacks by default. ([#1666](https://github.com/taiki-e/install-action/pull/1666))
|
||||||
|
|||||||
1
TOOLS.md
1
TOOLS.md
@@ -22,6 +22,7 @@ See the [Supported tools section in README.md](README.md#supported-tools) for ho
|
|||||||
| [**cargo-careful**](https://github.com/RalfJung/cargo-careful) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/RalfJung/cargo-careful/releases) | Linux, macOS, Windows | [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) |
|
| [**cargo-careful**](https://github.com/RalfJung/cargo-careful) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/RalfJung/cargo-careful/releases) | Linux, macOS, Windows | [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) |
|
||||||
| [**cargo-cyclonedx**](https://github.com/CycloneDX/cyclonedx-rust-cargo) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/CycloneDX/cyclonedx-rust-cargo/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/CycloneDX/cyclonedx-rust-cargo/blob/main/LICENSE) |
|
| [**cargo-cyclonedx**](https://github.com/CycloneDX/cyclonedx-rust-cargo) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/CycloneDX/cyclonedx-rust-cargo/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/CycloneDX/cyclonedx-rust-cargo/blob/main/LICENSE) |
|
||||||
| [**cargo-deadlinks**](https://github.com/deadlinks/cargo-deadlinks) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/deadlinks/cargo-deadlinks/releases) | Linux, macOS, Windows | [MIT](https://github.com/deadlinks/cargo-deadlinks/blob/master/LICENSE-MIT) OR [Apache-2.0](https://github.com/deadlinks/cargo-deadlinks/blob/master/LICENSE-APACHE) |
|
| [**cargo-deadlinks**](https://github.com/deadlinks/cargo-deadlinks) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/deadlinks/cargo-deadlinks/releases) | Linux, macOS, Windows | [MIT](https://github.com/deadlinks/cargo-deadlinks/blob/master/LICENSE-MIT) OR [Apache-2.0](https://github.com/deadlinks/cargo-deadlinks/blob/master/LICENSE-APACHE) |
|
||||||
|
| [**cargo-deb**](https://github.com/kornelski/cargo-deb) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/kornelski/cargo-deb/releases) | Linux | [MIT](https://github.com/kornelski/cargo-deb/blob/main/LICENSE) |
|
||||||
| [**cargo-deny**](https://github.com/EmbarkStudios/cargo-deny) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/EmbarkStudios/cargo-deny/releases) | Linux, macOS, Windows | [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) |
|
| [**cargo-deny**](https://github.com/EmbarkStudios/cargo-deny) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/EmbarkStudios/cargo-deny/releases) | Linux, macOS, Windows | [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) |
|
||||||
| [**cargo-dinghy**](https://github.com/sonos/dinghy) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/sonos/dinghy/releases) | Linux, macOS | [MIT](https://github.com/sonos/dinghy/blob/main/LICENSE-MIT) OR [Apache-2.0](https://github.com/sonos/dinghy/blob/main/LICENSE-APACHE) |
|
| [**cargo-dinghy**](https://github.com/sonos/dinghy) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/sonos/dinghy/releases) | Linux, macOS | [MIT](https://github.com/sonos/dinghy/blob/main/LICENSE-MIT) OR [Apache-2.0](https://github.com/sonos/dinghy/blob/main/LICENSE-APACHE) |
|
||||||
| [**cargo-export**](https://github.com/bazhenov/cargo-export) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/bazhenov/cargo-export/releases) | Linux, macOS, Windows | [MIT](https://github.com/bazhenov/cargo-export/blob/master/LICENSE) |
|
| [**cargo-export**](https://github.com/bazhenov/cargo-export) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/bazhenov/cargo-export/releases) | Linux, macOS, Windows | [MIT](https://github.com/bazhenov/cargo-export/blob/master/LICENSE) |
|
||||||
|
|||||||
17
main.sh
17
main.sh
@@ -161,6 +161,17 @@ download_and_extract() {
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
*.deb)
|
||||||
|
if ! type -P dpkg-deb >/dev/null; then
|
||||||
|
case "${base_distro}" in
|
||||||
|
debian | fedora | suse | arch | alpine)
|
||||||
|
printf '::group::Install packages required for installation (dpkg)\n'
|
||||||
|
sys_install dpkg
|
||||||
|
printf '::endgroup::\n'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
mkdir -p -- "${tmp_dir}"
|
mkdir -p -- "${tmp_dir}"
|
||||||
@@ -194,6 +205,12 @@ download_and_extract() {
|
|||||||
mv -- "${tmp}" "${bin_dir}/"
|
mv -- "${tmp}" "${bin_dir}/"
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
*.deb)
|
||||||
|
dpkg-deb -x tmp .
|
||||||
|
for tmp in "${bin_in_archive[@]}"; do
|
||||||
|
mv -- "${tmp}" "${bin_dir}/"
|
||||||
|
done
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
for tmp in "${installed_bin[@]}"; do
|
for tmp in "${installed_bin[@]}"; do
|
||||||
mv -- tmp "${tmp}"
|
mv -- tmp "${tmp}"
|
||||||
|
|||||||
37
manifests/cargo-deb.json
generated
Normal file
37
manifests/cargo-deb.json
generated
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"rust_crate": "cargo-deb",
|
||||||
|
"template": {
|
||||||
|
"x86_64_linux_gnu": {
|
||||||
|
"url": "https://github.com/kornelski/cargo-deb/releases/download/v${version}/cargo-deb_${version}-1_amd64.deb",
|
||||||
|
"bin": "usr/bin/cargo-deb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"license_markdown": "[MIT](https://github.com/kornelski/cargo-deb/blob/main/LICENSE)",
|
||||||
|
"latest": {
|
||||||
|
"version": "3.6.3"
|
||||||
|
},
|
||||||
|
"3": {
|
||||||
|
"version": "3.6.3"
|
||||||
|
},
|
||||||
|
"3.6": {
|
||||||
|
"version": "3.6.3"
|
||||||
|
},
|
||||||
|
"3.6.3": {
|
||||||
|
"x86_64_linux_gnu": {
|
||||||
|
"etag": "0x8DE63F58EBB06E1",
|
||||||
|
"hash": "e4b8c1a499a8f4e5b96d72f0d1ec9da8005ba379aee95aaeef83860991c831c3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"3.6.2": {
|
||||||
|
"x86_64_linux_gnu": {
|
||||||
|
"etag": "0x8DE0A5D04840934",
|
||||||
|
"hash": "a0053e0089f0efb194013e9629087c247d1de6cb439b7381b4109e21153b991e"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"3.6.1": {
|
||||||
|
"x86_64_linux_gnu": {
|
||||||
|
"etag": "0x8DDE4DDD98766C4",
|
||||||
|
"hash": "c7c890cc90dae8c4f5f9ad0ff3d7675fec74fbb57ff89c4f27cfbbab34676e93"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,6 +8,7 @@ cd -- "$(dirname -- "$0")"/../..
|
|||||||
# They don't provide prebuilt binaries for musl or old glibc host.
|
# They don't provide prebuilt binaries for musl or old glibc host.
|
||||||
# version `GLIBC_2.35' not found
|
# version `GLIBC_2.35' not found
|
||||||
glibc_pre_2_39_incompat=(
|
glibc_pre_2_39_incompat=(
|
||||||
|
cargo-deb
|
||||||
zizmor
|
zizmor
|
||||||
)
|
)
|
||||||
glibc_pre_2_35_incompat=(
|
glibc_pre_2_35_incompat=(
|
||||||
@@ -116,6 +117,9 @@ case "$(uname -s)" in
|
|||||||
if [[ "${runner}" == "ubuntu:14.04" ]]; then
|
if [[ "${runner}" == "ubuntu:14.04" ]]; then
|
||||||
incompat_tools+=(cyclonedx)
|
incompat_tools+=(cyclonedx)
|
||||||
fi
|
fi
|
||||||
|
if [[ "${runner}" == "almalinux:10"* ]]; then
|
||||||
|
incompat_tools+=(cargo-deb) # no dpkg in package manager
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
Darwin) host_os=macos ;;
|
Darwin) host_os=macos ;;
|
||||||
MINGW* | MSYS* | CYGWIN* | Windows_NT) host_os=windows ;;
|
MINGW* | MSYS* | CYGWIN* | Windows_NT) host_os=windows ;;
|
||||||
|
|||||||
12
tools/codegen/base/cargo-deb.json
Normal file
12
tools/codegen/base/cargo-deb.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"repository": "https://github.com/kornelski/cargo-deb",
|
||||||
|
"license_markdown": "[MIT](https://github.com/kornelski/cargo-deb/blob/main/LICENSE)",
|
||||||
|
"tag_prefix": "v",
|
||||||
|
"rust_crate": "${package}",
|
||||||
|
"platform": {
|
||||||
|
"x86_64_linux_gnu": {
|
||||||
|
"asset_name": "${package}_${version}-1_amd64.deb",
|
||||||
|
"bin": "usr/bin/${package}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user