https://pulumi.com logo
Title
j

jolly-fall-57688

02/23/2023, 4:31 PM
What channel is most appropriate to post a question about Pulumi's GitHub Actions (pulumi/actions@v4)?
m

melodic-tomato-39005

02/23/2023, 4:42 PM
I think here is fine.
j

jolly-fall-57688

02/23/2023, 4:49 PM
We would like to incorporate the Pulumi Actions into our CI/CD workflow. I looked through the examples but could not find a way set a variable for our "stack-name". We would like to use GitHub Environments to help trigger deployments with Pulumi. Right now the only way I can get our action to work is by hardcoding a stack-name.
- uses: pulumi/actions@v4
        with:
          work-dir: fargate/infra
          command: preview
          stack-name: acmecorp/mystack/dev
We would like to have stage and prod deployments use GitHub Actions.
m

melodic-tomato-39005

02/23/2023, 4:55 PM
You can use a regular Github Actions variable to make the stack name dynamic. There’s no special Pulumi support required. It would look something like this:
stack-name: ${{ env.stack }}
j

jolly-fall-57688

02/23/2023, 4:55 PM
Thank you.
s

strong-match-67698

02/24/2023, 7:48 AM
or use inputs, those are basic mechanisms of github actions