From 920c08966c004e95419dd7a7398f9c52cb15bf85 Mon Sep 17 00:00:00 2001 From: Kuba Wieczorek Date: Wed, 24 Jul 2024 12:24:30 +0100 Subject: [PATCH] [VAULT-28666] Enable the --clobber flag on GitHub CLI release downloads in CI to avoid errors when retrying (#27852) --- .github/actions/set-up-buf/action.yml | 2 +- .github/actions/set-up-gofumpt/action.yml | 2 +- .github/actions/set-up-gosimports/action.yml | 2 +- .github/actions/set-up-gotestsum/action.yml | 2 +- .github/actions/set-up-misspell/action.yml | 2 +- .github/actions/set-up-staticcheck/action.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/actions/set-up-buf/action.yml b/.github/actions/set-up-buf/action.yml index e48f254509..b151a307a0 100644 --- a/.github/actions/set-up-buf/action.yml +++ b/.github/actions/set-up-buf/action.yml @@ -60,7 +60,7 @@ runs: fi mkdir -p tmp - ./.github/scripts/retry-command.sh gh release download "$VERSION" -p "buf-${OS}-${ARCH}.tar.gz" -O tmp/buf.tgz -R bufbuild/buf + ./.github/scripts/retry-command.sh gh release download "$VERSION" --clobber -p "buf-${OS}-${ARCH}.tar.gz" -O tmp/buf.tgz -R bufbuild/buf pushd tmp && tar -xvf buf.tgz && popd mv tmp/buf/bin/buf "$DESTINATION" rm -rf tmp diff --git a/.github/actions/set-up-gofumpt/action.yml b/.github/actions/set-up-gofumpt/action.yml index 2d046c7cb4..884f915c29 100644 --- a/.github/actions/set-up-gofumpt/action.yml +++ b/.github/actions/set-up-gofumpt/action.yml @@ -56,6 +56,6 @@ runs: export OS="darwin" fi - ./.github/scripts/retry-command.sh gh release download "$VERSION" -p "gofumpt_*_${OS}_${ARCH}" -O gofumpt -R mvdan/gofumpt + ./.github/scripts/retry-command.sh gh release download "$VERSION" --clobber -p "gofumpt_*_${OS}_${ARCH}" -O gofumpt -R mvdan/gofumpt chmod +x gofumpt mv gofumpt "$DESTINATION" diff --git a/.github/actions/set-up-gosimports/action.yml b/.github/actions/set-up-gosimports/action.yml index 3aacd2c31b..06623ecba0 100644 --- a/.github/actions/set-up-gosimports/action.yml +++ b/.github/actions/set-up-gosimports/action.yml @@ -57,7 +57,7 @@ runs: fi mkdir -p tmp - ./.github/scripts/retry-command.sh gh release download "$VERSION" -p "gosimports_*_${OS}_${ARCH}.tar.gz" -O tmp/gosimports.tgz -R rinchsan/gosimports + ./.github/scripts/retry-command.sh gh release download "$VERSION" --clobber -p "gosimports_*_${OS}_${ARCH}.tar.gz" -O tmp/gosimports.tgz -R rinchsan/gosimports pushd tmp && tar -xvf gosimports.tgz && popd mv tmp/gosimports "$DESTINATION" rm -rf tmp diff --git a/.github/actions/set-up-gotestsum/action.yml b/.github/actions/set-up-gotestsum/action.yml index e45ed9e430..6ea84c4500 100644 --- a/.github/actions/set-up-gotestsum/action.yml +++ b/.github/actions/set-up-gotestsum/action.yml @@ -54,7 +54,7 @@ runs: fi mkdir -p tmp - ./.github/scripts/retry-command.sh gh release download "$VERSION" -p "*${OS}_${ARCH}.tar.gz" -O tmp/gotestsum.tgz -R gotestyourself/gotestsum + ./.github/scripts/retry-command.sh gh release download "$VERSION" --clobber -p "*${OS}_${ARCH}.tar.gz" -O tmp/gotestsum.tgz -R gotestyourself/gotestsum pushd tmp && tar -xvf gotestsum.tgz && popd mv tmp/gotestsum "$DESTINATION" rm -rf tmp diff --git a/.github/actions/set-up-misspell/action.yml b/.github/actions/set-up-misspell/action.yml index 4ce499eeee..4447da06ad 100644 --- a/.github/actions/set-up-misspell/action.yml +++ b/.github/actions/set-up-misspell/action.yml @@ -57,7 +57,7 @@ runs: fi mkdir -p tmp - ./.github/scripts/retry-command.sh gh release download "$VERSION" -p "misspell_*_${OS}_${ARCH}.tar.gz" -O tmp/misspell.tgz -R golangci/misspell + ./.github/scripts/retry-command.sh gh release download "$VERSION" --clobber -p "misspell_*_${OS}_${ARCH}.tar.gz" -O tmp/misspell.tgz -R golangci/misspell pushd tmp && tar -xvf misspell.tgz && popd mv tmp/misspell_"$(echo "$VERSION" | tr -d v)"_${OS}_${ARCH}/misspell "$DESTINATION" rm -rf tmp diff --git a/.github/actions/set-up-staticcheck/action.yml b/.github/actions/set-up-staticcheck/action.yml index efd253ad05..528474c4bd 100644 --- a/.github/actions/set-up-staticcheck/action.yml +++ b/.github/actions/set-up-staticcheck/action.yml @@ -57,7 +57,7 @@ runs: fi mkdir -p tmp - ./.github/scripts/retry-command.sh gh release download "$VERSION" -p "staticcheck_${OS}_${ARCH}.tar.gz" -O tmp/staticcheck.tgz -R dominikh/go-tools + ./.github/scripts/retry-command.sh gh release download "$VERSION" --clobber -p "staticcheck_${OS}_${ARCH}.tar.gz" -O tmp/staticcheck.tgz -R dominikh/go-tools pushd tmp && tar -xvf staticcheck.tgz && popd mv tmp/staticcheck/staticcheck "$DESTINATION" rm -rf tmp