4 months ago
We are deploying our backend from Github Actions via CLI. Since today it worked fine but today we are persistently getting error "Failed to upload code with status code 403 Forbidden". We managed to deploy manually by connecting the environment to Github branch but we would like to return to Github Actions soon.
I tried rotating the token but it didn't help.
6 Replies
Status changed to Awaiting User Response railway[bot] • 4 months ago
4 months ago
name: Deploy Railway app
description: 'Deploys Railway app'
inputs:
railway-token:
description: 'Railway token'
required: true
service:
description: 'Service to deploy'
required: true
environment:
description: 'Environment to deploy to'
required: true
runs:
using: 'composite'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
- uses: bahmutov/npm-install@v1
- name: Install Railway
shell: bash
run: npm i -g @railway/cli
- name: Deploy
shell: bash
run: |
railway up -s ${{ inputs.service }} -e ${{ inputs.environment }}
env:
RAILWAY_TOKEN: ${{ inputs.railway-token }}
And then the workflow itself, trimmed to include just this service:
name: Production backend flow
on:
workflow_dispatch:
permissions:
contents: write
jobs:
deploy-backend:
name: Deploy backend
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- name: Deploy Railway
uses: ./.github/actions/deploy-railway
with:
railway-token: ${{ secrets.RAILWAY_TOKEN }}
service: jamboo
environment: production
Deployments failsfor all services and for all environments where we use CLI to deploy. PR deployments and deployments via connected branches work fine.
Attachments
Status changed to Awaiting Railway Response railway[bot] • 4 months ago
4 months ago
Can you confirm -
inputs.service
Is a service ID and not a service name.inputs.environment
Is an environment ID and not an environment name.inputs.environment
Is the same environment that theRAILWAY_TOKEN
was created under.RAILWAY_TOKEN
Still exists.
Status changed to Awaiting User Response railway[bot] • 4 months ago
4 months ago
Sorry, I forgot to reply but yesterday things started to work again. No change was made since Friday. It seems your servers just needed a weekend to rest and they are again ready to handle our messy code.
Status changed to Awaiting Railway Response railway[bot] • 4 months ago
Status changed to Awaiting User Response railway[bot] • 4 months ago
Status changed to Solved brody • 4 months ago
Status changed to Awaiting Railway Response brody • 3 months ago
brody
Can you confirm -inputs.service Is a service ID and not a service name.inputs.environment Is an environment ID and not an environment name.inputs.environment Is the same environment that the RAILWAY_TOKEN was created under.RAILWAY_TOKEN Still exists.
3 months ago
Can you confirm these for me?
Status changed to Awaiting User Response railway[bot] • 3 months ago