Skip to content

Commit a0a256c

Browse files
committed
FIX (DevOps) @W-15619625@: Workflow jobs properly sequenced.
1 parent 6c1e42b commit a0a256c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/workflows/create-release-branch.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ jobs:
128128
# Build the scanner tarball so it can be installed locally when we run tests.
129129
build-scanner-tarball:
130130
name: 'Build scanner tarball'
131+
needs: verify-should-run
131132
uses: ./.github/workflows/build-scanner-tarball.yml
132133
with:
133134
# Note: Using `dev` here is technically incorrect. For full completeness's sake, we should probably be
@@ -138,9 +139,10 @@ jobs:
138139
# Run all the various tests against the newly created branch.
139140
test-release-branch:
140141
name: 'Run unit tests'
141-
needs: build-scanner-tarball
142+
needs: [build-scanner-tarball, create-release-branch]
142143
uses: ./.github/workflows/run-tests.yml
143144
with:
144145
# We want to validate the extension against whatever version of the scanner we *plan* to publish,
145146
# not what's *already* published.
146147
use-scanner-tarball: true
148+
target-branch: ${{ needs.create-release-branch.outputs.branch-name }}

.github/workflows/run-tests.yml

+7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
required: false
88
type: boolean
99
default: false
10+
target-branch:
11+
description: "What branch should be checked out?"
12+
required: falsetype: string
13+
# If no target branch is specified, just use the one we'd use normally.
14+
default: ${{ github.sha }}
1015

1116
jobs:
1217
build-and-run:
@@ -17,6 +22,8 @@ jobs:
1722
steps:
1823
- name: 'Check out the code'
1924
uses: actions/checkout@v4
25+
with:
26+
ref: ${{ inputs.target-branch }}
2027
- name: 'Set up NodeJS'
2128
uses: actions/setup-node@v4
2229
with:

0 commit comments

Comments
 (0)