Skip to content

Commit 3138388

Browse files
committed
ci: Add missing ENV variable
TARGET_BRANCH was lost during refactoring of CI from a single script to multiple github jobs (also fix existing formatting issues)
1 parent 5b9a60c commit 3138388

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

.github/workflows/ci-common.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
container-version:
1111
required: true
1212
type: string
13+
base-sha:
14+
required: true
15+
type: string
1316
env:
1417
RUSTFLAGS: "-Dwarnings"
1518
CFLAGS: "-Werror"
@@ -38,6 +41,8 @@ jobs:
3841
lint-py:
3942
runs-on: ubuntu-22.04
4043
container: ${{ inputs.container-repo }}:${{ inputs.container-version }}
44+
env:
45+
TARGET_BRANCH: ${{ inputs.base-sha }}
4146
steps:
4247
- name: Clone the repo
4348
uses: actions/checkout@v4
@@ -57,6 +62,8 @@ jobs:
5762
runs-on: ubuntu-22.04
5863
container:
5964
image: ${{ inputs.container-repo }}:${{ inputs.container-version }}
65+
env:
66+
TARGET_BRANCH: ${{ inputs.base-sha }}
6067
steps:
6168
- name: Clone the repo
6269
uses: actions/checkout@v4

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ jobs:
2424
with:
2525
container-version: ${{ needs.dev-container.outputs.container-version }}
2626
container-repo: ${{ needs.dev-container.outputs.container-repo }}
27+
base-sha: ${{ github.event.before }}
2728
secrets: inherit

.github/workflows/pr-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
with:
2222
container-repo: ${{ needs.dev-container.outputs.container-repo }}
2323
container-version: ${{ needs.dev-container.outputs.container-version }}
24+
base-sha: ${{ github.event.pull_request.base.sha }}
2425
secrets: inherit
2526

2627
# Build the firmware on every commit to simplify bisecting the firmware

0 commit comments

Comments
 (0)