File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 runs-on : ubuntu-latest
2727 timeout-minutes : 30
2828 env :
29- # Keep both names because Railway CLI behavior varies across versions.
30- RAILWAY_TOKEN : ${{ secrets.RAILWAY_TOKEN }}
29+ # Workspace-scoped tokens must be passed as RAILWAY_API_TOKEN.
3130 RAILWAY_API_TOKEN : ${{ secrets.RAILWAY_TOKEN }}
3231 RAILWAY_PROJECT_ID : ${{ secrets.RAILWAY_PROJECT_ID }}
3332 RAILWAY_ENVIRONMENT_ID : ${{ secrets.RAILWAY_ENVIRONMENT_ID }}
3635 steps :
3736 - name : Validate Railway secrets
3837 run : |
39- test -n "${RAILWAY_TOKEN }" || (echo "Missing secret: RAILWAY_TOKEN" && exit 1)
38+ test -n "${RAILWAY_API_TOKEN }" || (echo "Missing secret: RAILWAY_TOKEN" && exit 1)
4039 test -n "${RAILWAY_PROJECT_ID}" || (echo "Missing secret: RAILWAY_PROJECT_ID" && exit 1)
4140 test -n "${RAILWAY_ENVIRONMENT_ID}" || (echo "Missing secret: RAILWAY_ENVIRONMENT_ID" && exit 1)
4241 test -n "${RAILWAY_SERVICE_ID}" || (echo "Missing secret: RAILWAY_SERVICE_ID" && exit 1)
6059
6160 - name : Deploy to Railway (CI mode)
6261 run : |
62+ # Some Railway CLI versions prefer RAILWAY_TOKEN when both are present.
63+ # Unset it to force workspace-token auth via RAILWAY_API_TOKEN.
64+ unset RAILWAY_TOKEN
65+
6366 # Railway builder failures can be transient (container bootstrap/network).
6467 # Retry the deploy to reduce false-negative workflow failures.
6568 for attempt in 1 2 3; do
You can’t perform that action at this time.
0 commit comments