Skip to content

Commit 6de6df3

Browse files
jirhikerclaude
andcommitted
Gate Dagster+ deploy on credential presence
The serverless deploy failed hard (Invalid URL '/graphql') whenever the DAGSTER_CLOUD_URL / DAGSTER_CLOUD_API_TOKEN secrets are unset, blocking every PR. Add a guard step so the deploy is skipped (green) when the secrets are absent, and only runs once they are configured. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 307119e commit 6de6df3

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

.github/workflows/dagster-cloud-branch-deployments.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,19 @@ jobs:
2222
outputs:
2323
build_info: ${{ steps.parse-workspace.outputs.build_info }}
2424
steps:
25+
- name: Check Dagster+ credentials present
26+
id: guard
27+
run: |
28+
if [ -n "${{ secrets.DAGSTER_CLOUD_URL }}" ] && [ -n "${{ secrets.DAGSTER_CLOUD_API_TOKEN }}" ]; then
29+
echo "enabled=true" >> "$GITHUB_OUTPUT"
30+
else
31+
echo "::notice::Dagster+ secrets (DAGSTER_CLOUD_URL / DAGSTER_CLOUD_API_TOKEN) not set; skipping deploy."
32+
echo "enabled=false" >> "$GITHUB_OUTPUT"
33+
fi
34+
2535
- name: Prerun Checks
2636
id: prerun
37+
if: steps.guard.outputs.enabled == 'true'
2738
uses: dagster-io/dagster-cloud-action/actions/utils/prerun@v0.1
2839

2940
- name: Launch Docker Deploy

.github/workflows/dagster-cloud-deploy.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,19 @@ jobs:
2525
outputs:
2626
build_info: ${{ steps.parse-workspace.outputs.build_info }}
2727
steps:
28+
- name: Check Dagster+ credentials present
29+
id: guard
30+
run: |
31+
if [ -n "${{ secrets.DAGSTER_CLOUD_URL }}" ] && [ -n "${{ secrets.DAGSTER_CLOUD_API_TOKEN }}" ]; then
32+
echo "enabled=true" >> "$GITHUB_OUTPUT"
33+
else
34+
echo "::notice::Dagster+ secrets (DAGSTER_CLOUD_URL / DAGSTER_CLOUD_API_TOKEN) not set; skipping deploy."
35+
echo "enabled=false" >> "$GITHUB_OUTPUT"
36+
fi
37+
2838
- name: Prerun Checks
2939
id: prerun
40+
if: steps.guard.outputs.enabled == 'true'
3041
uses: dagster-io/dagster-cloud-action/actions/utils/prerun@v0.1
3142

3243
- name: Launch Docker Deploy

0 commit comments

Comments
 (0)