From 92ca2a65f68f47037ee2905d7597556460348a31 Mon Sep 17 00:00:00 2001 From: Florian Wilhelm Date: Sun, 1 May 2022 14:07:11 +0200 Subject: [PATCH] Conditonally upload vm image --- .github/workflows/ci-vm.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-vm.yml b/.github/workflows/ci-vm.yml index 73a0169..2420b97 100644 --- a/.github/workflows/ci-vm.yml +++ b/.github/workflows/ci-vm.yml @@ -12,6 +12,11 @@ on: - 'git-repos.txt' - 'vm-resources/**' workflow_dispatch: + inputs: + uploadVmImage: + description: 'Upload image of the built vm' + required: true + default: 'false' env: VAGRANT_DEFAULT_PROVIDER: virtualbox @@ -49,8 +54,10 @@ jobs: - name: Package VM run: | vagrant package --debug --no-tty --output containers-lab.box --info info.json - - run: ls -la -# - uses: actions/upload-artifact@v3 -# with: -# name: containers-lab-vagrant-box -# path: containers-lab.box + - run: ls -la; sha256sum containers-lab.box + + - uses: actions/upload-artifact@v3 + if: github.event.inputs.uploadVmImage + with: + name: containers-lab-vagrant-box + path: containers-lab.box