mirror of
https://github.com/DeterminateSystems/determinate-nix-action.git
synced 2026-02-25 07:07:11 +00:00
Initial commit
This commit is contained in:
parent
681714470d
commit
fbd616d075
15 changed files with 800 additions and 0 deletions
47
tools/generate.sh
Executable file
47
tools/generate.sh
Executable file
|
|
@ -0,0 +1,47 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Allow "useless" cat
|
||||
# shellcheck disable=SC2002
|
||||
|
||||
set -eux
|
||||
|
||||
REPO="DeterminateSystems/nix-installer-action"
|
||||
FILEPATH="action.yml"
|
||||
|
||||
get_action_as_json() (
|
||||
rev=$1
|
||||
|
||||
curl -s -L "https://raw.githubusercontent.com/$REPO/$rev/$FILEPATH" \
|
||||
| yq
|
||||
)
|
||||
|
||||
main() {
|
||||
|
||||
echo "::group::{./tools/state.json}"
|
||||
cat ./tools/state.json
|
||||
echo "::endgroup::"
|
||||
|
||||
|
||||
nix_installer_action_revision=$(cat ./tools/state.json | jq -r .nix_installer_action_revision)
|
||||
determinate_nix_tag=$(cat ./tools/state.json | jq -r .determinate_nix_tag)
|
||||
checkout_action_tag=$(cat ./tools/state.json | jq -r .checkout_action_tag)
|
||||
|
||||
get_action_as_json "$nix_installer_action_revision" > upstream.json
|
||||
|
||||
echo "::group::{./upstream.json}"
|
||||
cat ./upstream.json
|
||||
echo "::endgroup::"
|
||||
|
||||
python3 -- ./tools/generate.py \
|
||||
"$determinate_nix_tag" \
|
||||
"$nix_installer_action_revision" \
|
||||
"$checkout_action_tag" \
|
||||
./upstream.json \
|
||||
./action.yml \
|
||||
./tools/README.template.md \
|
||||
./README.md
|
||||
|
||||
rm ./upstream.json
|
||||
}
|
||||
|
||||
main
|
||||
Loading…
Add table
Add a link
Reference in a new issue