No service found. Please link one via
railway linkor specify one via the
--serviceflag when running workflow
juansecu
FREEOP
10 months ago
Hi. I'm currently using the following GitHub Actions workflow to deploy my app to Railway:
name: Deploy Application
on:
workflow_run:
workflows: ["Deliver Application"]
types:
- completed
jobs:
deploy:
runs-on: ubuntu-latest
env:
RAILWAY_API_TOKEN: ${{ secrets.RAILWAY_API_TOKEN }}
RAILWAY_ENVIRONMENT_ID: ${{ secrets.ENVIRONMENT_ID }}
RAILWAY_PROJECT_ID: ${{ secrets.PROJECT_ID }}
RAILWAY_SERVICE_ID: ${{ secrets.RAILWAY_SERVICE_ID }}
steps:
- uses: actions/checkout@v4
- name: Set Up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install Railway CLI
run: npm install -g @railway/cli
- name: Deploy to Railway
run: |
railway link --service=$RAILWAY_SERVICE_ID --project_id=$RAILWAY_PROJECT_ID --environment=$RAILWAY_ENVIRONMENT_ID
railway redeploy --yes
But I'm getting the following error every time the workflow runs: No service found. Please link one via railway link or specify one via the --service flag.
Any idea on how to solve this issue? Because it looks like the project is successfully linked:
Project <Project Name> linked successfully! 🎉1 Replies
juansecu
FREEOP
10 months ago
Ok, just found the RAILWAY_SERVICE_ID variable in the UI, something that was not showing before, and its content is actually different from copying the service ID using Ctrl + K. Thanks anyway.
Status changed to Solved itsrems • 10 months ago