mirror of
https://github.com/taiki-e/install-action.git
synced 2026-04-08 18:05:42 +08:00
Update script and CI config
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -134,7 +134,7 @@ jobs:
|
|||||||
if: startsWith(matrix.os, 'windows')
|
if: startsWith(matrix.os, 'windows')
|
||||||
- name: Test cmd
|
- name: Test cmd
|
||||||
run: just --version & shfmt --version & protoc --version
|
run: just --version & shfmt --version & protoc --version
|
||||||
shell: cmd
|
shell: cmd # zizmor: ignore[misfeature] used for compatibility testing
|
||||||
if: startsWith(matrix.os, 'windows')
|
if: startsWith(matrix.os, 'windows')
|
||||||
# We use the version output to check the version of cargo-binstall, but they
|
# We use the version output to check the version of cargo-binstall, but they
|
||||||
# several times change the version output format in the past so we need to
|
# several times change the version output format in the past so we need to
|
||||||
|
|||||||
4
.github/zizmor.yml
vendored
4
.github/zizmor.yml
vendored
@@ -10,7 +10,3 @@ rules:
|
|||||||
policies:
|
policies:
|
||||||
taiki-e/*: any
|
taiki-e/*: any
|
||||||
'*': ref-pin
|
'*': ref-pin
|
||||||
misfeature:
|
|
||||||
ignore:
|
|
||||||
# We use `shell: cmd` to test compatibility.
|
|
||||||
- ci.yml
|
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
|||||||
target
|
target
|
||||||
Cargo.lock
|
Cargo.lock
|
||||||
|
mutants.out*
|
||||||
tmp
|
tmp
|
||||||
|
|
||||||
# For platform and editor specific settings, it is recommended to add to
|
# For platform and editor specific settings, it is recommended to add to
|
||||||
|
|||||||
@@ -909,8 +909,21 @@ EOF
|
|||||||
JOB_DEFAULT_SHELL="${default_shell}"
|
JOB_DEFAULT_SHELL="${default_shell}"
|
||||||
fi
|
fi
|
||||||
for step in $(jq -c '.steps[]' <<<"${job}"); do
|
for step in $(jq -c '.steps[]' <<<"${job}"); do
|
||||||
|
uses=''
|
||||||
|
# https://github.com/vmactions: prepare, run
|
||||||
|
# https://github.com/cross-platform-actions/action: run, shell
|
||||||
|
# https://github.com/uraimo/run-on-arch-action: setup, install, run, shell
|
||||||
prepare=''
|
prepare=''
|
||||||
eval "$(jq -r 'if .run then @sh "RUN=\(.run) shell=\(.shell)" else @sh "RUN=\(.with.run) prepare=\(.with.prepare) shell=\(.with.shell)" end' <<<"${step}")"
|
setup=''
|
||||||
|
install=''
|
||||||
|
eval "$(jq -r 'if .run then @sh "RUN=\(.run) shell=\(.shell)" else @sh "uses=\(.uses) FALLBACK=\(.with.fallback) RUN=\(.with.run) prepare=\(.with.prepare) setup=\(.with.setup) install=\(.with.install) shell=\(.with.shell)" end' <<<"${step}")"
|
||||||
|
if [[ "${uses}" == */install-action@* ]]; then
|
||||||
|
if [[ "${FALLBACK}" != 'none' ]]; then
|
||||||
|
error "'fallback: none' must be set for install-action (${name}.steps[${n}])"
|
||||||
|
fi
|
||||||
|
_=$((n++))
|
||||||
|
continue
|
||||||
|
fi
|
||||||
if [[ "${RUN}" == 'null' ]]; then
|
if [[ "${RUN}" == 'null' ]]; then
|
||||||
_=$((n++))
|
_=$((n++))
|
||||||
continue
|
continue
|
||||||
@@ -924,8 +937,14 @@ EOF
|
|||||||
shell='sh'
|
shell='sh'
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
shellcheck_for_gha "${RUN}" "${shell}" "${workflow_path} ${name}.steps[${n}].run"
|
if [[ -z "${uses}" ]]; then
|
||||||
shellcheck_for_gha "${prepare:-null}" 'sh' "${workflow_path} ${name}.steps[${n}].run"
|
shellcheck_for_gha "${RUN}" "${shell}" "${workflow_path} ${name}.steps[${n}].run"
|
||||||
|
else
|
||||||
|
shellcheck_for_gha "${RUN}" "${shell}" "${workflow_path} ${name}.steps[${n}].with.run"
|
||||||
|
fi
|
||||||
|
shellcheck_for_gha "${prepare:-null}" 'sh' "${workflow_path} ${name}.steps[${n}].with.prepare"
|
||||||
|
shellcheck_for_gha "${setup:-null}" "${shell}" "${workflow_path} ${name}.steps[${n}].with.setup"
|
||||||
|
shellcheck_for_gha "${install:-null}" "${shell}" "${workflow_path} ${name}.steps[${n}].with.install"
|
||||||
_=$((n++))
|
_=$((n++))
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user