From b32c6bf805cb1b8212318a6ae6efe34b75cb0c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Mon, 23 Oct 2023 13:42:41 +0200 Subject: [PATCH] release: Always use actions/checkout to ensure we're in a git repo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise we'll face issues like: ``` Run tag=$(echo $GITHUB_REF | cut -d/ -f3-) tag=$(echo $GITHUB_REF | cut -d/ -f3-) tarball="kata-static-$tag-amd64.tar.xz" mv kata-static.tar.xz "$GITHUB_WORKSPACE/${tarball}" pushd $GITHUB_WORKSPACE echo "uploading asset '${tarball}' for tag: ${tag}" GITHUB_TOKEN=*** gh release upload "${tag}" "${tarball}" popd shell: /usr/bin/bash -e {0} ~/work/kata-containers/kata-containers ~/work/kata-containers/kata-containers uploading asset 'kata-static-3.3.0-alpha0-amd64.tar.xz' for tag: 3.3.0-alpha0 failed to run git: fatal: not a git repository (or any of the parent directories): .git ``` Fixes: #8286 (or better, just a follow up of that) Signed-off-by: Fabiano FidĂȘncio --- .github/workflows/release.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index da4929bf01..a8891ed025 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -73,6 +73,8 @@ jobs: needs: publish-multi-arch-images runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 + - name: download-artifacts-amd64 uses: actions/download-artifact@v3 with: