mirror of
https://github.com/taiki-e/install-action.git
synced 2025-12-27 01:54:13 -05:00
tools: Make tool name branch/tag push atomic
This commit is contained in:
@@ -145,6 +145,7 @@ tools+=(
|
|||||||
# Non-manifest-based tools.
|
# Non-manifest-based tools.
|
||||||
tools+=(valgrind)
|
tools+=(valgrind)
|
||||||
|
|
||||||
|
refs=()
|
||||||
for tool in "${tools[@]}"; do
|
for tool in "${tools[@]}"; do
|
||||||
git checkout -b "${tool}"
|
git checkout -b "${tool}"
|
||||||
sed -E "${in_place[@]}" action.yml \
|
sed -E "${in_place[@]}" action.yml \
|
||||||
@@ -152,12 +153,12 @@ for tool in "${tools[@]}"; do
|
|||||||
-e "s/# default: #publish:tool/default: ${tool}/g"
|
-e "s/# default: #publish:tool/default: ${tool}/g"
|
||||||
git add action.yml
|
git add action.yml
|
||||||
git commit -m "${tool}"
|
git commit -m "${tool}"
|
||||||
retry git push origin -f refs/heads/"${tool}"
|
|
||||||
git tag -f "${tool}"
|
git tag -f "${tool}"
|
||||||
retry git push origin -f refs/tags/"${tool}"
|
|
||||||
git checkout main
|
git checkout main
|
||||||
git branch -D "${tool}"
|
refs+=(refs/heads/"${tool}" refs/tags/"${tool}")
|
||||||
done
|
done
|
||||||
|
retry git push origin --atomic -f "${refs[@]}"
|
||||||
|
git branch -D "${tools[@]}"
|
||||||
|
|
||||||
schema_workspace=/tmp/workspace
|
schema_workspace=/tmp/workspace
|
||||||
rm -rf -- "${schema_workspace}"
|
rm -rf -- "${schema_workspace}"
|
||||||
|
|||||||
Reference in New Issue
Block a user