How can I ignore Environment protection on specific job/step? #142148
Replies: 1 comment
|
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Uh oh!
There was an error while loading. Please reload this page.
Select Topic Area
Question
Body
Hi,
We have a repo running Terraform, using GitHub Actions for our pipelines. We wanted to use environment protections to Gate our prod environment so that it requires an approval to perform the actual deployment of changes.
The slight snag is that by switching these on, the Terraform plan step that runs to check the contents of our PRs before they are merged now flags up requesting an approver. The environment protection does not appear to have any options to allow me to say that it should only apply when doing the deployment step (which adding an environment means GHA always assumes you are doing, which is a different issue), and not when doing the plan step.
I've tried a number of different ways to try and bypass the rule, but most of those techniques are intended for bypassing branch protection rules, which work somewhat differently.
Any recommendations for this scenario?
Regards,
Rob.
All reactions