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

20 messages · Page 1 of 1 (latest)

wide epoch
#

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.

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 }}

I have two environments (test and production) and the secret tokens are properly stored on Github project configs.

humble jasperBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

scarlet basinBOT
#

Project ID: 388443d3-f0e6-45fa-a08b-e91081cdd79a

pale leaf
#

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

wide epoch
#

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

pale leaf
#

make sure you are on the latest cli version locally, then you can use the cli's help flag to learn more

#

but I'm pretty sure it should be as simple as adding --service <serviceId> to your railway up command

wide epoch
#

okay, I'll try, thx

pale leaf
#

that's literally just a guess though

wide epoch
#

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

humble jasperBOT
pale leaf
#

you mean service id?

wide epoch
#

yes

pale leaf
#

could you edit that message to say service id, you said project id

wide epoch
#

done

pale leaf
#

thank you!

wide epoch
#

thank you, have a nice weekend