I have setup one Github Action workflow. In which I want to trigger job when Pull request is merged from feature to dev branch. I have use Github Action environment with one protection Rule. Github Action is throwing an error message Branch “feature” is not allowed to deploy to dev due to environment protection rules.
Attaching .yaml of workflow.
name: "terraform-deploy" on: pull_request: types: - closed branches: - dev jobs: dev-plan: if: github.event.pull_request.merged environment: name: dev runs-on: ubuntu-20.04 steps: - name: "my task" run: echo "hello"
Leave an answer