Skip to content

Commit c345f9c

Browse files
authored
chore(ci): tidy up CI/CD (#4513)
1 parent 50c8999 commit c345f9c

5 files changed

Lines changed: 10 additions & 48 deletions

File tree

.github/workflows/artifacts.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
- name: Retrieve pull token
106106
id: pull-token
107107
run: |
108-
PULL_TOKEN="$(depot pull-token --project ${VARS_DEPOT_PROJECT})"
108+
PULL_TOKEN="$(depot pull-token --project "${VARS_DEPOT_PROJECT}")"
109109
echo "token=$PULL_TOKEN" >> "$GITHUB_OUTPUT"
110110
echo "::add-mask::$PULL_TOKEN"
111111
env:
@@ -212,7 +212,7 @@ jobs:
212212
- name: Retrieve pull token
213213
id: pull-token
214214
run: |
215-
PULL_TOKEN="$(depot pull-token --project ${VARS_DEPOT_PROJECT})"
215+
PULL_TOKEN="$(depot pull-token --project "${VARS_DEPOT_PROJECT}")"
216216
echo "token=$PULL_TOKEN" >> "$GITHUB_OUTPUT"
217217
echo "::add-mask::$PULL_TOKEN"
218218
env:

.github/workflows/ci.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,6 @@ jobs:
375375
migrations:
376376
name: Migration Checks
377377
runs-on: depot-ubuntu-latest-8
378-
environment: dev
379378

380379
steps:
381380
- name: Checkout repository
@@ -474,7 +473,7 @@ jobs:
474473
if [ -z "$BASE_COMMIT" ]; then
475474
BASE_COMMIT=$(git log -1 --format=%h)
476475
fi
477-
echo "sha=${BASE_COMMIT}" >> $GITHUB_OUTPUT
476+
echo "sha=${BASE_COMMIT}" >> "$GITHUB_OUTPUT"
478477
479478
echo "sha=${BASE_COMMIT}"
480479
@@ -542,7 +541,7 @@ jobs:
542541
if: ${{ always() }}
543542
uses: ./.github/workflows/workflow-result.yaml
544543
with:
545-
result: ${{ contains(needs.*.result, 'failure') && 'fail' || 'pass' }}
544+
result: ${{ (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || !contains(needs.*.result, 'success')) && 'fail' || 'pass' }}
546545

547546
dependency-review:
548547
name: Dependency review

.github/workflows/pr-checks.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ jobs:
2727
run: python3 -m unittest discover -s .github/tools/migrate -p 'test_*.py'
2828

2929
- name: Check atlas.sum is append-only
30-
run: python3 .github/tools/migrate/check_atlas_sum_append_only.py "${{ github.event.pull_request.base.sha }}"
30+
# base.sha is always a hex SHA, but route it via env for consistency
31+
# with the repo-wide rule of never interpolating ${{ }} into run:.
32+
run: python3 .github/tools/migrate/check_atlas_sum_append_only.py "$BASE_SHA"
33+
env:
34+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
3135

3236
release-label:
3337
name: Release note label

.github/workflows/require-all-reviewers.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/sdk-python-dev-release.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ jobs:
1919
- name: Checkout repository
2020
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2121
with:
22-
ref: ${{ github.head_ref }}
2322
persist-credentials: false
2423

2524
- name: Get short SHA
2625
id: get-short-sha
2726
run: |
28-
id=$(echo ${{ github.sha }} | cut -c 1-12)
29-
echo "id=${id}" >> $GITHUB_OUTPUT
27+
echo "id=${GITHUB_SHA:0:12}" >> "$GITHUB_OUTPUT"
3028
3129
# If you keep using Nix for your dev shell / tooling, retain these steps
3230
- name: Set up Nix

0 commit comments

Comments
 (0)