diff --git a/.github/workflows/build-oss.yml b/.github/workflows/build-oss.yml index afde1eb656..2fddf9d092 100644 --- a/.github/workflows/build-oss.yml +++ b/.github/workflows/build-oss.yml @@ -56,6 +56,7 @@ jobs: uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: ref: ${{ inputs.branch }} + fetch-depth: 0 - name: Authenticate to Google Cloud id: auth diff --git a/.github/workflows/build-plus.yml b/.github/workflows/build-plus.yml index 86c8b912b9..e271a77bab 100644 --- a/.github/workflows/build-plus.yml +++ b/.github/workflows/build-plus.yml @@ -57,6 +57,7 @@ jobs: uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: ref: ${{ inputs.branch }} + fetch-depth: 0 - name: Authenticate to Google Cloud id: auth diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfda4599cb..6687f0273e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -302,7 +302,7 @@ jobs: authenticated: ${{ needs.checks.outputs.forked_workflow != 'true' }} full-build: ${{ inputs.force && inputs.force || false }} tag: ${{ needs.checks.outputs.build_tag }} - branch: ${{ github.head_ref && github.head_ref || github.ref }} + branch: ${{ (github.head_ref && needs.checks.outputs.forked_workflow != 'true') && github.head_ref || github.ref }} permissions: contents: read actions: read @@ -325,7 +325,7 @@ jobs: target: ${{ matrix.target }} go-md5: ${{ needs.checks.outputs.go_code_md5 }} base-image-md5: ${{ needs.checks.outputs.docker_md5 }} - branch: ${{ github.head_ref && github.head_ref || github.ref }} + branch: ${{ (github.head_ref && needs.checks.outputs.forked_workflow != 'true') && github.head_ref || github.ref }} tag: ${{ needs.checks.outputs.build_tag }} authenticated: ${{ needs.checks.outputs.forked_workflow != 'true' }} full-build: ${{ inputs.force && inputs.force || false }} @@ -349,7 +349,7 @@ jobs: target: ${{ matrix.target }} go-md5: ${{ needs.checks.outputs.go_code_md5 }} base-image-md5: ${{ needs.checks.outputs.docker_md5 }} - branch: ${{ github.head_ref && github.head_ref || github.ref }} + branch: ${{ (github.head_ref && needs.checks.outputs.forked_workflow != 'true') && github.head_ref || github.ref }} tag: ${{ needs.checks.outputs.build_tag }} nap-modules: ${{ matrix.nap_modules }} authenticated: ${{ needs.checks.outputs.forked_workflow != 'true' }}