From 68ee38a13f20368ae94fe611e0f57112fbf7dfe4 Mon Sep 17 00:00:00 2001 From: Sean Tronsen Date: Tue, 15 Sep 2026 13:59:27 -0600 Subject: [PATCH] fix: resolve go.mod unavailable due to late checkout Signed-off-by: Sean Tronsen --- .../build-publish-container-goreleaser.yml | 10 +++++----- .github/workflows/go-build-release.yml | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-publish-container-goreleaser.yml b/.github/workflows/build-publish-container-goreleaser.yml index f518063..80b8b77 100644 --- a/.github/workflows/build-publish-container-goreleaser.yml +++ b/.github/workflows/build-publish-container-goreleaser.yml @@ -45,6 +45,11 @@ jobs: container_build_publish: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v6.0.2 + with: + fetch-tags: true + fetch-depth: 0 - name: Install build dependencies if: ${{ inputs.build_deps != '' }} env: @@ -82,11 +87,6 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Checkout - uses: actions/checkout@v6.0.2 - with: - fetch-tags: true - fetch-depth: 0 # Set environment variables required by GoReleaser - name: Set build environment variables run: | diff --git a/.github/workflows/go-build-release.yml b/.github/workflows/go-build-release.yml index 451fece..3323aaa 100644 --- a/.github/workflows/go-build-release.yml +++ b/.github/workflows/go-build-release.yml @@ -78,6 +78,13 @@ jobs: name: GoReleaser ${{ (inputs.snapshot == 'true' || (inputs.snapshot != 'false' && !startsWith(github.ref, 'refs/tags/v'))) && 'Snapshot' || 'Release' }} runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v6.0.3 + with: + fetch-tags: ${{ inputs.fetch-tags }} + fetch-depth: ${{ inputs.fetch-depth }} + ref: ${{ inputs.ref }} + - name: Set up Go uses: actions/setup-go@v6.4.0 with: @@ -93,13 +100,6 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Checkout - uses: actions/checkout@v6.0.3 - with: - fetch-tags: ${{ inputs.fetch-tags }} - fetch-depth: ${{ inputs.fetch-depth }} - ref: ${{ inputs.ref }} - - name: Set build environment variables run: | if git diff-index --quiet HEAD --; then