Closed nidiekma closed 3 months ago
I think you need to install your nodejs dependencies before the pulumi/actions
step, for example
- name: Installing dependencies
run: npm ci # or yarn install, pnpm install, ... depending on your package manager
working-directory: ./pulumi # depending on where your pulumi project lives
Could you check if that resolves the issue?
Somewhat related, a while ago we added the pulumi install
command. We can't use that in a step before the pulumi/actions
step because the Pulumi CLI is not installed yet at that point, but maybe the pulumi/actions
step itself should have an option to run that for you š¤
I'm using a monorepo with npm workspaces and thought i correctly configured it but just to be double sure i made another npm install step inside the pulumi folder (i already had one in the root folder, just missed the code out for it in this issue, my bad). So my actions file looks like this:
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Install dependencies
run: npm install
- name: Install dependencies in pulumi folder
run: |
cd pulumi
npm install
- name: Deploy to AWS with pulumi
uses: pulumi/actions@v5
with:
command: preview
stack-name: freelance-app/freelance-dev
work-dir: ./pulumi
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
So now i get the error:
Logging in using access token from PULUMI_ACCESS_TOKEN
Previewing update (freelance-app/freelance-dev)
View Live: https://app.pulumi.com/freelance-app/freelance-app/freelance-dev/previews/e[9](https://github.com/ResoluteError/freelance/actions/runs/10504168288/job/29099037145#step:7:10)83641a-3f6b-46b4-b978-0ae4f2764ed5
[resource plugin docker-4.5.4] installing
[resource plugin aws-5.42.0] installing
[resource plugin aws-6.41.0] installing
[resource plugin aws-6.37.1] installing
@ Previewing update..................
@ Previewing update.....
pulumi:pulumi:Stack freelance-app-freelance-dev running
@ Previewing update............
pulumi:providers:aws default_6_41_0 error: pulumi:providers:aws resource 'default_6_41_0' has a problem: No valid credential sources found.
pulumi:pulumi:Stack freelance-app-freelance-dev
pulumi:providers:aws default_6_41_0 1 error
Diagnostics:
pulumi:providers:aws (default_6_41_0):
error: pulumi:providers:aws resource 'default_6_41_0' has a problem: No valid credential sources found.
Please see https://www.pulumi.com/registry/packages/aws/installation-configuration/ for more information about providing credentials.
NEW: You can use Pulumi ESC to set up dynamic credentials with AWS OIDC to ensure the correct and valid credentials are used.
Learn more: https://www.pulumi.com/registry/packages/aws/installation-configuration/#dynamically-generate-credentials-via-pulumi-esc
Error: Process completed with exit code [25](https://github.com/ResoluteError/freelance/actions/runs/10504168288/job/29099037145#step:7:26)5.
But that seems to be another issue and with the authentication and not the strange "Pulumi SDK not isntalled" error i got first and dont understand. So that one seems to come from a wrong package.json configuration on my side. Thanks for the hint, otherwise i would still believe that it is just a bug inside the pulumi action and not a misconfiguration from my package.json.
I will close this issues, thanks!
What happened?
I try to run pulumi preview in my github action like this:
And get the error:
Example
See github actions above and output above
Output of
pulumi about
Additional context
No response
Contributing
Vote on this issue by adding a š reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).