所以当我试图运行这个动作时:
Run OfficeDev/teamsfx-cli-action@v1我得到以下错误:
/usr/local/bin/npx teamsfx config set run-from GitHubAction
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/teamsfx - Not found
npm ERR! 404
npm ERR! 404 'teamsfx@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2021-11-25T13_27_07_216Z-debug.log
Install for [ 'teamsfx@latest' ] failed with code 1
Error: The process '/usr/local/bin/npx' failed with exit code 1我不知道我在这里遗漏了什么,我使用的ci/cd脚本是默认操作,正如所描述的这里
我的脚本非常简单,所以我可能忽略了一些显而易见的东西:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
env:
AZURE_ACCOUNT_NAME: ${{secrets.AZURE_ACCOUNT_NAME}}
AZURE_ACCOUNT_PASSWORD: ${{secrets.AZURE_ACCOUNT_PASSWORD}}
AZURE_SUBSCRIPTION_ID: ${{secrets.AZURE_SUBSCRIPTION_ID}}
AZURE_TENANT_ID: ${{secrets.AZURE_TENANT_ID}}
M365_ACCOUNT_NAME: ${{secrets.M365_ACCOUNT_NAME}}
M365_ACCOUNT_PASSWORD: ${{secrets.M365_ACCOUNT_PASSWORD}}
M365_TENANT_ID: ${{secrets.M365_TENANT_ID}}
steps:
# Provision resources.
- uses: OfficeDev/teamsfx-cli-action@v1
with:
commands: provision
subscription: ${{env.AZURE_SUBSCRIPTION_ID}}
# Deploy the code.
- uses: OfficeDev/teamsfx-cli-action@v1
with:
commands: deploy
# Publish the Teams App.
- uses: OfficeDev/teamsfx-cli-action@v1
with:
commands: publish发布于 2021-11-25 14:44:50
你错过了teamsfx-cli。请参阅文档
"devDependencies": { "@microsoft/teamsfx-cli": "^0.3.1" }一旦安装了该命令,npx teamsfx命令就可以工作了。
在更改工作流方面,您可能希望将项目签出作为第一步,然后运行npm ci。
https://stackoverflow.com/questions/70112659
复制相似问题