Skip to content

Commit 79c6b97

Browse files
committed
Address cpflow workflow review fixes
1 parent 2c49140 commit 79c6b97

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

.github/workflows/cpflow-deploy-review-app.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ jobs:
7676
ruby -S cpflow generate-github-actions --staging-branch master
7777
# shellcheck disable=SC2016
7878
ruby -0pi -e '$_.gsub!(/so callers can pass `\$\{\{ vars\.CPLN_CLI_VERSION \}\}` unconditionally\./, "so callers can pass the repository variable value unconditionally."); $_.gsub!(/so callers can pass `\$\{\{ vars\.CPFLOW_VERSION \}\}` unconditionally\./, "so callers can pass the repository variable value unconditionally.")' .github/actions/cpflow-setup-environment/action.yml
79+
if grep -n '\$''{{ vars\.\(CPLN_CLI_VERSION\|CPFLOW_VERSION\) }}' .github/actions/cpflow-setup-environment/action.yml; then
80+
echo "::error::Bootstrapped cpflow setup action still contains GitHub metadata expressions in input descriptions."
81+
exit 1
82+
fi
7983
8084
- name: Validate required secrets and variables
8185
id: config

.github/workflows/cpflow-deploy-staging.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ jobs:
5656
- name: Checkout repository
5757
if: steps.check-branch.outputs.is_deployable == 'true'
5858
uses: actions/checkout@v4
59+
with:
60+
persist-credentials: false
5961

6062
- name: Validate required secrets and variables
6163
if: steps.check-branch.outputs.is_deployable == 'true'
@@ -103,7 +105,7 @@ jobs:
103105

104106
deploy:
105107
needs: [validate-branch, build]
106-
if: needs.validate-branch.outputs.is_deployable == 'true'
108+
if: needs.validate-branch.outputs.is_deployable == 'true' && needs.build.result == 'success'
107109
runs-on: ubuntu-latest
108110
timeout-minutes: 30
109111
steps:

.github/workflows/cpflow-promote-staging-to-production.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ env:
1616
# Worst-case wall time per attempt is HEALTH_CHECK_INTERVAL plus the curl --max-time below
1717
# (10s), so the defaults give a ~10 minute window (24 × (15 + 10) = 600s) — enough for
1818
# most Rails cold boots (asset precompile + db:migrate + workload readiness).
19-
HEALTH_CHECK_RETRIES: 24
20-
HEALTH_CHECK_INTERVAL: 15
19+
HEALTH_CHECK_RETRIES: ${{ vars.HEALTH_CHECK_RETRIES || '24' }}
20+
HEALTH_CHECK_INTERVAL: ${{ vars.HEALTH_CHECK_INTERVAL || '15' }}
2121
# Space-separated list of HTTP statuses considered healthy. The default accepts 301/302
2222
# because `curl` is invoked without `-L`, so a root `/` that redirects to a login page
2323
# (common for Rails apps that auth-gate `/`) would otherwise be reported as unhealthy
@@ -31,8 +31,8 @@ env:
3131
# expose a dedicated health endpoint (e.g. "200" for a plain /health, or "200 401 403"
3232
# for apps that auth-gate / without redirecting).
3333
HEALTH_CHECK_ACCEPTED_STATUSES: ${{ vars.HEALTH_CHECK_ACCEPTED_STATUSES || '200 301 302' }}
34-
ROLLBACK_READINESS_RETRIES: 24
35-
ROLLBACK_READINESS_INTERVAL: 15
34+
ROLLBACK_READINESS_RETRIES: ${{ vars.ROLLBACK_READINESS_RETRIES || '24' }}
35+
ROLLBACK_READINESS_INTERVAL: ${{ vars.ROLLBACK_READINESS_INTERVAL || '15' }}
3636
PRIMARY_WORKLOAD: ${{ vars.PRIMARY_WORKLOAD }}
3737

3838
concurrency:

0 commit comments

Comments
 (0)