https://pulumi.com logo
#general
Title
# general
b

blue-vegetable-34564

11/04/2021, 4:15 PM
Hi, I’d like to setup CI/CD using Pulumi GitHub Action, using branch-per-stack strategy. It’s not clear to me how can I map branch name to stack name? The problem is described by https://github.com/pulumi/actions/issues/89. Apparently, Pulumi CLI Action 
v1
supported this feature, while
v2
does not. What workarounds are you using?
f

future-refrigerator-88869

11/04/2021, 8:40 PM
You can manually export the branch name into an env variable within github actions and then use that as the stack name. Take a look at this answer here to get some inspiration: https://stackoverflow.com/a/64210623
b

blue-vegetable-34564

11/05/2021, 4:55 PM
This is exactly what I was looking for. Thank you @future-refrigerator-88869 very much! ❤️
🙌 1
e

elegant-window-55250

11/09/2021, 7:29 PM
This is also an example which can give you the same functionality: https://github.com/cobraz/setup-variables/blob/main/examples/simple-workflow.yaml