Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multi-environment example #203

Merged
merged 3 commits into from
Sep 6, 2023
Merged

Add multi-environment example #203

merged 3 commits into from
Sep 6, 2023

Conversation

ncalteen
Copy link
Contributor

@ncalteen ncalteen commented Sep 6, 2023

👋🏻 This PR adds a new multi-job example that shows how separate environments can be used to start/stop the branch-deploy process and perform the actual deployment.

The original need that resulted in this approach was being able to deploy to multiple Azure environments using Terraform. In particular, each environment was located on a separate tenant/subscription, hence the need for different credentials, Terraform workspaces, etc. Originally, I tried writing this to use only a secrets environment as mentioned in the README, but the workflow ended up with a lot of additional fluff to simply choose the right secrets/variables. I left in a fair bit of detail, so please feel free to remove anything that might be extraneous.

Also: Prettier automatically formatted some of the other examples. I did confirm that nothing was changed functionally.

I'd be happy to hear any feedback!

docs/examples.md Outdated Show resolved Hide resolved
if: ${{ needs.start.outputs.continue == 'true' }}

# Use the environment specified by the `.noop` or `.deploy` comment.
environment: ${{ needs.start.outputs.environment }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is extremely clever! I love it 🚀

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙇🏻 Thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being able to do this potentially changes the entire approach to using this Action for a lot of flexibility. This is wild! Thank you 🌟

Co-authored-by: Grant Birkinbine <grant.birkinbine@gmail.com>
@GrantBirki GrantBirki merged commit 13faa8f into github:main Sep 6, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants