- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在工作 on a project that uses Pulumi to provision some infrastructure pieces on Azure 。我切换到新的pulumi/actions@v2行动which was released recently .
我的 GitHub Actions 工作流程如下所示:
name: pulumi-preview-up
on: [push]
env:
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
jobs:
preview-up-destroy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Pulumi CLI
uses: pulumi/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c8a9abbca1a7a6e5a1a6bbbca9a4a4e5b8bda4bda5a1e5aba4a188bef9e6f8e6f9" rel="noreferrer noopener nofollow">[email protected]</a>
- uses: pulumi/actions@v2
with:
command: preview
stack-name: dev
现在我遇到了以下错误(请参阅 the full GHA logs here ):
Error: code: 255
stdout: Previewing update (github-638882160)
View Live: https://app.pulumi.com/jonashackt/scmbreakoutpulumi/github-638882160/previews/450a1f61-549d-4669-a7de-d8da8fc622f7
pulumi:pulumi:Stack scmbreakoutpulumi-github-638882160 error: It looks like the Pulumi SDK has not been installed. Have you run npm install or yarn install?
pulumi:pulumi:Stack scmbreakoutpulumi-github-638882160 1 message
Diagnostics:
pulumi:pulumi:Stack (scmbreakoutpulumi-github-638882160):
error: It looks like the Pulumi SDK has not been installed. Have you run npm install or yarn install?
stderr: error: failed to load language plugin nodejs: could not read plugin [/home/runner/.pulumi/bin/pulumi-language-nodejs] stdout: EOF
err?:
最佳答案
新的 Pulumi v2 GitHub Action 使用 new Pulumi Automation API 。如the docs state :
This means that there is no supporting functionality for npm or pipinstalls. This functionality should be deferred to the correct GitHubMarketplace actions that support it.
这意味着配置 pulumi/actions
和 pulumi/action-install-pulumi-cli
不再足够(就像我们习惯使用 Pulumi v1 Action 那样)行动。我们还需要自己设置特定于语言的 GitHub Action 环境 - 并且需要自己安装相应的依赖项 - 之前使用pulumi/ Action
!
假设使用 JavaScript/Typscript 风格的 Pulumi,我们需要添加 actions/setup-node操作并随后运行 npm install
。在我们的 workflow.yml
中,它看起来像这样:
name: pulumi-preview-up
on: [push]
env:
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
jobs:
preview-up-destroy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: In order to use the Pulumi v2 action, we need to setup the Pulumi project specific language environment
uses: actions/setup-node@v2
with:
node-version: '14'
- name: After setting up the Pulumi project specific language environment, we need to install the dependencies also
run: npm install
- name: Install Pulumi CLI
uses: pulumi/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="83e2e0f7eaecedaeeaedf0f7e2efefaef3f6eff6eeeaaee0efeac3f5b2adb3adb2" rel="noreferrer noopener nofollow">[email protected]</a>
- uses: pulumi/actions@v2
with:
command: preview
stack-name: dev
如果您选择 JavaScript/TypeScript 之外的其他语言,您还需要设置匹配的环境。文档显示 examples for Python, Go and .Net also .
关于azure - Pulumi GitHub Action pulumi/actions@v2 : error: It looks like the Pulumi SDK has not been installed. 你运行过npm install 或yarn install 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66562876/
我是一名优秀的程序员,十分优秀!