File tree Expand file tree Collapse file tree 3 files changed +19
-4
lines changed
Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 1313 - uses : actions/checkout@v4
1414 - uses : rhysd/actionlint@v1.7.11
1515 - name : Validate script syntax
16- run : bash -n scripts/check-apps-manifest.sh scripts/check-app-builds.sh
16+ run : bash -n scripts/check-apps-manifest.sh scripts/check-app-builds.sh scripts/check-workflow-guards.sh
17+ - name : Validate workflow guards
18+ run : bash scripts/check-workflow-guards.sh
1719 - name : Validate manifest and source layout
1820 run : bash scripts/check-apps-manifest.sh
1921 - name : Build application images
Original file line number Diff line number Diff line change @@ -101,11 +101,11 @@ jobs:
101101 refresh-catalogs :
102102 needs : publish
103103 runs-on : ubuntu-latest
104+ env :
105+ CATALOG_REFRESH_TOKEN : ${{ secrets.CATALOG_REFRESH_TOKEN }}
104106 steps :
105107 - name : Trigger downstream catalog refresh
106- if : ${{ secrets.CATALOG_REFRESH_TOKEN != '' }}
107- env :
108- CATALOG_REFRESH_TOKEN : ${{ secrets.CATALOG_REFRESH_TOKEN }}
108+ if : ${{ env.CATALOG_REFRESH_TOKEN != '' }}
109109 run : |
110110 set -euo pipefail
111111 for repo in sw-ourbox-catalog-demo; do
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ ROOT=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) /.." && pwd) "
5+
6+ matches=" $( grep -RInE ' ^[[:space:]]*if:.*\bsecrets\.' " ${ROOT} /.github/workflows" || true) "
7+ if [[ -n " ${matches} " ]]; then
8+ echo " workflow if conditions must not reference secrets.* directly" >&2
9+ echo " ${matches} " >&2
10+ exit 1
11+ fi
12+
13+ echo " Workflow guard checks passed."
You can’t perform that action at this time.
0 commit comments