From 27b831cb65cf4c064d68da7caa43c5bce4e709f1 Mon Sep 17 00:00:00 2001 From: Prateek Chandra Date: Fri, 14 Feb 2025 17:34:24 +0530 Subject: [PATCH 1/2] fix: fetch depth 0 Signed-off-by: Prateek Chandra --- .github/workflows/image.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index 0a655920e..5d0ce7e6c 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -18,6 +18,7 @@ jobs: steps: - uses: actions/checkout@v4 with: + fetch-depth: 0 submodules: 'recursive' - uses: DeterminateSystems/nix-installer-action@v14 - uses: DeterminateSystems/magic-nix-cache-action@v8 From bff608ca1932118e1ca6f26eab775caf27355142 Mon Sep 17 00:00:00 2001 From: Prateek Chandra Date: Fri, 14 Feb 2025 17:45:13 +0530 Subject: [PATCH 2/2] fix: add the run section Signed-off-by: Prateek Chandra --- .github/workflows/image.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index 5d0ce7e6c..59b233134 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -18,8 +18,14 @@ jobs: steps: - uses: actions/checkout@v4 with: - fetch-depth: 0 submodules: 'recursive' + fetch-depth: 0 + - run: | + # BUG: HEAD tag is fetched as lightweight instead of annotated + # https://github.com/actions/checkout/issues/290 + if [ "${{ github.ref_type }}" == "tag" ]; then + git fetch -f origin ${{ github.ref }}:${{ github.ref }} + fi - uses: DeterminateSystems/nix-installer-action@v14 - uses: DeterminateSystems/magic-nix-cache-action@v8 - name: Login to Docker Hub