Skip to content

Commit f6cfcae

Browse files
committed
allow setting packer cleanup option on fatimage builds
1 parent b5ff56a commit f6cfcae

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/fatimage.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ on:
1010
- LEAFCLOUD
1111
- SMS
1212
- ARCUS
13+
cleanup_on_failure:
14+
description: Cleanup Packer resources on failure
15+
type: boolean
16+
required: true
17+
default: true
1318

1419
jobs:
1520
openstack:
@@ -78,7 +83,7 @@ jobs:
7883
packer init .
7984
8085
PACKER_LOG=1 packer build \
81-
-on-error=${{ vars.PACKER_ON_ERROR }} \
86+
-on-error=${{ github.event.inputs.cleanup_on_failure && 'cleanup' || 'abort' }} \
8287
-var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl \
8388
-var "source_image_name=${{ matrix.build.source_image_name }}" \
8489
-var "image_name=${{ matrix.build.image_name }}" \

0 commit comments

Comments
 (0)