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

sticky-bear-14421

07/03/2023, 12:43 PM
Hi, I am looking at the docs for the pulumi/actions@v3 and I have some trouble to pass a parameter.
Copy code
- uses: pulumi/actions@v3
        with:
          command: up -c "imageTag=${{ github.sha }}"
          stack-name: dev
When I run this in my shell with -c imageTag=164179107ea14fecab2c87ccba42dfee6d826f38 this works, but not from the Action. Here I get an error:
Copy code
Validation failed:
{
  "command": "Expected \"up\" | \"update\" | \"refresh\" | \"destroy\" | \"preview\", but was string"
}.
Object should match { command: "up" | "update" | "refresh" | "destroy" | "preview"; stackName: string; workDir: string; commentOnPr: boolean; options: { parallel?: number; message?: string; expectNoChanges?: boolean; diff?: boolean; replace?: string[]; target?: string[]; policyPacks?: string[]; policyPackConfigs?: string[]; targetDependents?: boolean; editCommentOnPr?: boolean; userAgent?: "pulumi/actions@v3"; pulumiVersion?: string; }; isPullRequest: boolean; }
I guess I cannot use up -c as command.
Found config-map as parameter but the documentation is kind of sparse.
Copy code
with:
  command: up
  config-map: "imageTag: ${{ github.sha }}"
This will pass an empty config value
Copy code
config-map: "{imageTag: ${{ github.sha }}}"
Or is it like this?
l

limited-rainbow-51650

07/03/2023, 2:16 PM
@sticky-bear-14421 here is an example how to pass a value to the
config-map
property: https://github.com/pulumi/actions/blob/f9775fbf93748847db8f2cf9f9ed889f37de416c/.github/workflows/workflow.yml#L76
s

sticky-bear-14421

07/03/2023, 2:17 PM
That would be great in the documentation, as it is quite complex.
Thanks for sharing
I even had a look in the examples directory of the actions repository, and learned a thing or two. But this one, I failed pretty hard on 🙂
4 Views