Here I want to create branch deployment pipeline. Deployment will be done on every pull request and we need to get a branch name, so that we call a workflow with that branch name. I have tried to do it in the following way, But it is giving an error.
on:
pull_request:
types: [opened, synchronize, reopened]
env:
WORKFLOW: 'bigelio/todo/.github/workflows/branch-deployment-serverless-deploy.yml@${{ github.head_ref }}'
deploy:
needs: [terraform]
uses: $WORKFLOW
secrets:
TF_API_TOKEN: ${{ secrets.TF_API_TOKEN }}
The error I am getting in github is this
Invalid workflow file: .github/workflows/branch-deployment-workflow.yml#L198
invalid value workflow reference: no version specified