Skip to content

Commit 031c531

Browse files
committed
fmt
1 parent f249d32 commit 031c531

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/ci/github-actions/calculate-job-matrix.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,10 @@ def substitute_github_vars(jobs: list) -> list:
186186
"""Replace GitHub context variables with environment variables in job configs."""
187187
for job in jobs:
188188
if "os" in job:
189-
job["os"] = job["os"].replace(
190-
"${{ github.run_id }}",
191-
os.environ["GITHUB_RUN_ID"]
192-
).replace(
193-
"${{ github.run_attempt }}",
194-
os.environ["GITHUB_RUN_ATTEMPT"]
189+
job["os"] = (
190+
job["os"]
191+
.replace("${{ github.run_id }}", os.environ["GITHUB_RUN_ID"])
192+
.replace("${{ github.run_attempt }}", os.environ["GITHUB_RUN_ATTEMPT"])
195193
)
196194
return jobs
197195

@@ -216,7 +214,6 @@ def substitute_github_vars(jobs: list) -> list:
216214
jobs = skip_jobs(jobs, channel)
217215
jobs = substitute_github_vars(jobs)
218216

219-
220217
if not jobs:
221218
raise Exception("Scheduled job list is empty, this is an error")
222219

0 commit comments

Comments
 (0)