generated from devcontainers/feature-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
857ea55
commit 04bbe39
Showing
2 changed files
with
50 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "actionlint", | ||
"id": "actionlint", | ||
"version": "1.0.0", | ||
"options": { | ||
"version": { | ||
"type": "string", | ||
"proposals": [ | ||
"latest" | ||
], | ||
"default": "latest", | ||
"description": "Select or enter an actionlint version." | ||
}, | ||
"installPath": { | ||
"type": "string", | ||
"default": "/usr/local/bin", | ||
"description": "The path where actionlint will be installed." | ||
} | ||
}, | ||
"installsAfter": [ | ||
"ghcr.io/devcontainers/features/common-utils" | ||
] | ||
} |
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,27 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -e | ||
|
||
ACTIONLINT_VERSION="${VERSION:-"latest"}" | ||
INSTALL_PATH="${INSTALLPATH:-"/usr/local/bin"}" | ||
|
||
if [ "$(id -u)" -ne 0 ]; then | ||
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.' | ||
exit 1 | ||
fi | ||
|
||
curl_installed="" | ||
|
||
if ! [ type curl >/dev/null 2>&1 ]; then | ||
apt update --yes | ||
apt install --no-install-recommends --yes curl ca-certificates | ||
|
||
curl_installed="true" | ||
fi | ||
|
||
curl -sSL https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash | \ | ||
/bin/bash -s -- "${ACTIONLINT_VERSION}" "${INSTALL_PATH}" | ||
|
||
if ! [ -z $curl_installed ]; then | ||
apt purge curl --autoremove --yes | ||
fi |