From e59e13ca088f3da67e0b7d3880a63d5b505b191a Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Sat, 4 Mar 2023 22:54:07 -0500 Subject: [PATCH] has to clean destination when bottling too. --- .github/workflows/bottle.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/bottle.yml b/.github/workflows/bottle.yml index 24c70235..28b713cd 100644 --- a/.github/workflows/bottle.yml +++ b/.github/workflows/bottle.yml @@ -52,6 +52,17 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + - name: clean destination + # Note: needed when changing a directory to a symlink, for example in + # https://github.com/teaxyz/pantry.extra/pull/435 + run: | + tar tzf $GITHUB_WORKSPACE/artifacts.tgz | \ + awk '{ print length, $0 }' | \ + sort -n -s -r | \ + cut -d" " -f2- | \ + xargs rm -rf + working-directory: ${{ steps.tea.outputs.prefix }} + - run: tar xzvf $GITHUB_WORKSPACE/artifacts.tgz working-directory: ${{ steps.tea.outputs.prefix }}