Skip to content

Commit 24baecd

Browse files
authored
Merge pull request #47 from redis/fix_unstable_checkout_refs
Explicit checkout_ref in all actions required by unstable build
2 parents f00bde0 + 9be6953 commit 24baecd

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

.github/actions/build-binary-package/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,16 @@ inputs:
99
arch:
1010
description: "Architecture to build for"
1111
required: true
12+
checkout_ref:
13+
description: "Ref to checkout"
14+
required: false
15+
default: ''
1216

1317
runs:
1418
using: "composite"
1519
steps:
1620
- uses: actions/checkout@v4
21+
ref: ${{ inputs.checkout_ref || '' }}
1722
- name: Determine build architecture
1823
shell: bash
1924
run: |

.github/workflows/apt.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ jobs:
2828
|| github.event_name == 'workflow_call')
2929
&& 'unstable'
3030
|| ''
31-
}}
31+
}}
32+
checkout_ref: ${{ github.ref_name == 'unstable' && 'unstable' || '' }}

.github/workflows/build-n-test-all-distros.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414
type: string
1515
SMOKE_TEST_IMAGES:
1616
type: string
17+
checkout_ref:
18+
type: string
19+
default: ''
1720

1821

1922
jobs:
@@ -26,6 +29,7 @@ jobs:
2629
steps:
2730
- name: Checkout code
2831
uses: actions/checkout@v4
32+
ref: ${{ inputs.checkout_ref || '' }}
2933
- name: Ensure Release Branch
3034
if: inputs.release_tag != '' && inputs.release_tag != 'unstable'
3135
id: ensure-branch
@@ -38,6 +42,7 @@ jobs:
3842
with:
3943
dist: ${{ matrix.dist }}
4044
release_tag: ${{ inputs.release_tag }}
45+
checkout_ref: ${{ inputs.checkout_ref || '' }}
4146

4247
build-binary-package:
4348
runs-on: ${{ contains(matrix.arch, 'arm') && 'ubuntu24-arm64-2-8' || 'ubuntu-24.04' }}
@@ -50,6 +55,7 @@ jobs:
5055
needs: build-source-package
5156
steps:
5257
- name: Checkout code
58+
ref: ${{ inputs.checkout_ref || '' }}
5359
uses: actions/checkout@v4
5460
- name: Ensure Release Branch
5561
if: inputs.release_tag != '' && inputs.release_tag != 'unstable'
@@ -64,6 +70,7 @@ jobs:
6470
dist: ${{ matrix.dist }}
6571
arch: ${{ matrix.arch }}
6672
run_id: ${{ github.run_id }}
73+
checkout_ref: ${{ inputs.checkout_ref || '' }}
6774

6875
smoke-test-archs:
6976
runs-on: ubuntu-latest
@@ -93,8 +100,10 @@ jobs:
93100
steps:
94101
- name: Checkout code
95102
uses: actions/checkout@v4
103+
ref: ${{ inputs.checkout_ref || '' }}
96104
- uses: ./.github/actions/run-smoke-tests
97105
with:
98106
image: ${{ matrix.image }}
99107
arch: ${{ matrix.arch }}
100108
run_id: ${{ github.run_id }}
109+
checkout_ref: ${{ inputs.checkout_ref || '' }}

0 commit comments

Comments
 (0)