Environments - Deployment branches and tags #118374
Unanswered
AndyOooh
asked this question in
Repositories
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Question
Body
Hi,
I am trying to use this feature to make sure I deploy to my correct gcp project and that my releases tags are formatted correct;y. However, it seems I may have misunderstood the use of it.
I have two environments:
In my workflow I have a matrix with the two environments:
The idea is only the environment which matches the release will deploy successfully (is this a bad approcah to achieving that?).
To ensure that I have set up the following Deployment branches and tags:
prod:
branch: main
staging:
branch: dev
With this setup I would expect the workflow to start one job for each of the environments on a release publish. So far so good. The next thing In would expect is that prod will fail (not deploy) if the target branch of the release is not main and vice versa, if the target branch is not dev I expect staging to not deploy.
However, they both succeed no matter what branch the release targets.
Have I completely misunderstood the purpose of this feature?
Beta Was this translation helpful? Give feedback.
All reactions