Failed to upload code with status code 403 Forbidden
dlabs-matic-leva
PROOP

10 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.

Solved

6 Replies

brody
EMPLOYEE

10 months ago

Hello,

Can you provide your action yaml file please?


Status changed to Awaiting User Response Railway 10 months ago


dlabs-matic-leva
PROOP

10 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 10 months ago


brody
EMPLOYEE

10 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 the RAILWAY_TOKEN was created under.

  • RAILWAY_TOKEN Still exists.


Status changed to Awaiting User Response Railway 10 months ago


dlabs-matic-leva
PROOP

10 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 10 months ago


brody
EMPLOYEE

10 months ago

Haha good enough for me, glad it's working again!


Status changed to Awaiting User Response Railway 10 months ago


Status changed to Solved brody 10 months ago


Status changed to Awaiting Railway Response brody 9 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.

brody
EMPLOYEE

9 months ago

Can you confirm these for me?


Status changed to Awaiting User Response Railway 9 months ago


Railway
BOT

4 months ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 4 months ago


Loading...