Add release option

This commit is contained in:
Greg Hellings
2022-06-01 14:45:02 -05:00
parent dc2d86454c
commit 84833b79a1
+5 -1
View File
@@ -2,6 +2,10 @@ name: Build the boxes
"on": "on":
workflow_dispatch: workflow_dispatch:
release:
types:
- published
- prereleased
jobs: jobs:
collect: collect:
@@ -53,7 +57,7 @@ jobs:
# Strip .sh if it is a dynamic one # Strip .sh if it is a dynamic one
file="$(printf "${{ matrix.distro }}" | sed -E -e 's/^(.*).sh$/\1/')" file="$(printf "${{ matrix.distro }}" | sed -E -e 's/^(.*).sh$/\1/')"
# Add a retry in case something bogus like a network failure happens # Add a retry in case something bogus like a network failure happens
until packer build -var-file="${file}" -var "qemu_accelerator=tcg" -except=upload sources; do until packer build -var-file="${file}" -var "qemu_accelerator=tcg" ${{ github.event_name != 'release' && '-except=upload' || '' }} sources; do
sleep 1 sleep 1
done done
env: env: