Skip to content

Commit

Permalink
workflows/vmtests: delete artifacts if run was successful
Browse files Browse the repository at this point in the history
commit 8d35b43 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 <mahe.tardy@gmail.com>
  • Loading branch information
mtardy committed Jan 3, 2024
1 parent a250225 commit 29c7035
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/vmtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 29c7035

Please sign in to comment.