Hi, I am looking at the docs for the pulumi/action...
# general
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
          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
  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?
@sticky-bear-14421 here is an example how to pass a value to the
property: https://github.com/pulumi/actions/blob/f9775fbf93748847db8f2cf9f9ed889f37de416c/.github/workflows/workflow.yml#L76
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 🙂