R
Railway14mo ago
Matheus

Multiple services found. Please specify a service to deploy to.

My CD step with github actions started failing without any changes on my github actions or any change on my environments. Out of nowhere it started giving me this error: Project id: 388443d3-f0e6-45fa-a08b-e91081cdd79a
Run railway up
railway up
shell: /usr/bin/bash -e {0}
env:
RAILWAY_TOKEN: ***
Multiple services found. Please specify a service to deploy to.
Error: Process completed with exit code 1.
Run railway up
railway up
shell: /usr/bin/bash -e {0}
env:
RAILWAY_TOKEN: ***
Multiple services found. Please specify a service to deploy to.
Error: Process completed with exit code 1.
This is my railway up snippet:
CD:
runs-on: ubuntu-latest
needs: [CI]
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3

- name: Install Railway
run: npm i -g @railway/cli

- name: Deploy to Test Environment
run: railway up
if: github.ref == 'refs/heads/test'
env:
RAILWAY_TOKEN: ${{ secrets.TEST_ACTIONS_TOKEN }}

- name: Deploy to Production Environment
run: railway up
if: github.ref == 'refs/heads/main'
env:
RAILWAY_TOKEN: ${{ secrets.PRODUCTION_ACTIONS_TOKEN }}
CD:
runs-on: ubuntu-latest
needs: [CI]
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3

- name: Install Railway
run: npm i -g @railway/cli

- name: Deploy to Test Environment
run: railway up
if: github.ref == 'refs/heads/test'
env:
RAILWAY_TOKEN: ${{ secrets.TEST_ACTIONS_TOKEN }}

- name: Deploy to Production Environment
run: railway up
if: github.ref == 'refs/heads/main'
env:
RAILWAY_TOKEN: ${{ secrets.PRODUCTION_ACTIONS_TOKEN }}
I have two environments (test and production) and the secret tokens are properly stored on Github project configs.
Solution:
make sure you are on the latest cli version locally, then you can use the cli's help flag to learn more
Jump to solution
15 Replies
Percy
Percy14mo ago
Project ID: 388443d3-f0e6-45fa-a08b-e91081cdd79a
Brody
Brody14mo ago
the cli was updated to fix some regressions, it will no longer just guess what service to up into, you will need to specify the service with the service arg this fix was put in place for a few reasons, one of them being preventing railway up from up'ing into database services automatically
Matheus
MatheusOP14mo ago
oh, I see. I did spent some time this morning about more info about railway up, but I haven't found how this parameter should be set can you link me to a doc with more details about the service arg? I couldn't find an example
Solution
Brody
Brody14mo ago
make sure you are on the latest cli version locally, then you can use the cli's help flag to learn more
Brody
Brody14mo ago
but I'm pretty sure it should be as simple as adding --service <serviceId> to your railway up command
Matheus
MatheusOP14mo ago
okay, I'll try, thx
Brody
Brody14mo ago
that's literally just a guess though
Matheus
MatheusOP14mo ago
sure, no problem, I'll see what I can find you've guesse it right! I thought that the error was referring to my environments inside my project, but is actually the service ID that the railway up wants
Brody
Brody14mo ago
you mean service id?
Matheus
MatheusOP14mo ago
yes
Brody
Brody14mo ago
could you edit that message to say service id, you said project id
Matheus
MatheusOP14mo ago
done
Brody
Brody14mo ago
thank you!
Matheus
MatheusOP14mo ago
thank you, have a nice weekend
Brody
Brody14mo ago
you too!
Want results from more Discord servers?
Add your server