From 29c703530cacdc4cffc9090d89f0716d986dde66 Mon Sep 17 00:00:00 2001 From: Mahe Tardy Date: Wed, 3 Jan 2024 10:56:26 +0100 Subject: [PATCH] workflows/vmtests: delete artifacts if run was successful commit 8d35b43b3a680a3076108b9f573a3ccf7c386881 was trying to delete the artifact using a hack (uploading an empty artifact with the same name, overriding it). Action/upload-artifact v4 broke that, making impossible to override existing artifacts. Some GitHub actions exists for this particular need and are maintained to follow actions/upload-artifact updates, let's try them. Signed-off-by: Mahe Tardy --- .github/workflows/vmtests.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/vmtests.yml b/.github/workflows/vmtests.yml index 98e6cae5e49..8f6348f8748 100644 --- a/.github/workflows/vmtests.yml +++ b/.github/workflows/vmtests.yml @@ -148,17 +148,15 @@ jobs: name: tetragon-vmtests-${{ matrix.kernel }}-${{ matrix.group }}-results path: go/src/github.com/cilium/tetragon/tests/vmtests/vmtests-results-* retention-days: 5 + post-test: runs-on: ubuntu-latest needs: [test] if: success() steps: - - name: Create truncated build file - run: | - touch /tmp/tetragon.tar - - name: Upload truncated file - uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4 - with: - name: tetragon-build - path: /tmp/tetragon.tar - retention-days: 1 + # delete the built binaries from the artifacts in case of overall success + - uses: geekyeggo/delete-artifact@9d15d164b1dcd538ff1b1a2984bc2c0240986c3b # v4.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: tetragon-build +