Skip to content

Commit 7164119

Browse files
authored
Forked workflow build (nginx#5835)
1 parent 5247156 commit 7164119

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.github/workflows/build-oss.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5757
with:
5858
ref: ${{ inputs.branch }}
59+
fetch-depth: 0
5960

6061
- name: Authenticate to Google Cloud
6162
id: auth

.github/workflows/build-plus.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5858
with:
5959
ref: ${{ inputs.branch }}
60+
fetch-depth: 0
6061

6162
- name: Authenticate to Google Cloud
6263
id: auth

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ jobs:
302302
authenticated: ${{ needs.checks.outputs.forked_workflow != 'true' }}
303303
full-build: ${{ inputs.force && inputs.force || false }}
304304
tag: ${{ needs.checks.outputs.build_tag }}
305-
branch: ${{ github.head_ref && github.head_ref || github.ref }}
305+
branch: ${{ (github.head_ref && needs.checks.outputs.forked_workflow != 'true') && github.head_ref || github.ref }}
306306
permissions:
307307
contents: read
308308
actions: read
@@ -325,7 +325,7 @@ jobs:
325325
target: ${{ matrix.target }}
326326
go-md5: ${{ needs.checks.outputs.go_code_md5 }}
327327
base-image-md5: ${{ needs.checks.outputs.docker_md5 }}
328-
branch: ${{ github.head_ref && github.head_ref || github.ref }}
328+
branch: ${{ (github.head_ref && needs.checks.outputs.forked_workflow != 'true') && github.head_ref || github.ref }}
329329
tag: ${{ needs.checks.outputs.build_tag }}
330330
authenticated: ${{ needs.checks.outputs.forked_workflow != 'true' }}
331331
full-build: ${{ inputs.force && inputs.force || false }}
@@ -349,7 +349,7 @@ jobs:
349349
target: ${{ matrix.target }}
350350
go-md5: ${{ needs.checks.outputs.go_code_md5 }}
351351
base-image-md5: ${{ needs.checks.outputs.docker_md5 }}
352-
branch: ${{ github.head_ref && github.head_ref || github.ref }}
352+
branch: ${{ (github.head_ref && needs.checks.outputs.forked_workflow != 'true') && github.head_ref || github.ref }}
353353
tag: ${{ needs.checks.outputs.build_tag }}
354354
nap-modules: ${{ matrix.nap_modules }}
355355
authenticated: ${{ needs.checks.outputs.forked_workflow != 'true' }}

0 commit comments

Comments
 (0)