Skip to content
Discussion options

You must be logged in to vote

Your called-deploy.yaml is already correct — it has on: workflow_call with all the expected inputs and secrets.

The error you’re seeing is most likely coming from the caller workflow syntax.

When calling a reusable workflow with uses:, the job must follow this structure:

jobs:
  deploy_fixed_staging:
    uses: bLACKZU/npm-ci-cd-actions/.github/workflows/called-deploy.yaml@main
    with:
      PR_number: main
      src_path: ./web
      remote_path: /var/app
      remote_host: ${{ vars.STAGING_HOST }}
      remote_user: ubuntu
    secrets:
      SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}

Important rules for caller workflows:

  • No runs-on in a job that uses uses:.
  • No name: or environment:

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@bLACKZU
Comment options

@bLACKZU
Comment options

@ElPoraz
Comment options

Answer selected by bLACKZU
@bLACKZU
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Question Ask and answer questions about GitHub features and usage Misc General discussions about GitHub Actions that don't fit other found themes.
3 participants