尝试使用GitHub操作创建AWS的CI/CD管道时遇到此错误

发布于 2025-02-01 21:02:58 字数 377 浏览 1 评论 0原文

在尝试使用GitHub操作为.NET Core项目创建CI/CD管道时,我遇到了以下错误。

相关图像

有人可以解释如何解决这个问题吗?被困在这里呆了很长时间,我只能在网上找到对此错误的PowerShell引用。

[编辑]: 按建议进行更改,但现在我得到了这个错误。 我不明白系统正在尝试找到哪个文件。

相关图像

I ran into the following error while trying to create a CI/CD pipeline for a .NET Core project using Github Actions.

Related image

Can someone explain how to resolve this? Been stuck here for quite some time and I could only find PowerShell references to this error online.

[edit]:
Made the changes as suggested but now I get this error.
I don't get which file the system is trying to find.

Related image

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

陌伤浅笑 2025-02-08 21:02:58

这里的问题是两个powershell变量内的结肠。您必须将PowerShell脚本中的行更改为:

docker build -t ${ECR_REGISTRY}/${ECR_REPOSITORY}:${IMAGE_TAG} .

我使用此简单的PowerShell脚本尝试了它:

$Variable1 = "Hello"
$Variable2 = "world"

Write-Host $Variable1:$Variable2

运行此脚本时,我会在您的图片中收到相同的错误消息。将脚本更改为以下

$Variable1 = "Hello"
$Variable2 = "world"

Write-Host ${Variable1}:${Variable2}

脚本的运行,没有任何错误。

The problem here is the colon within two powershell variables. You have to change the line in you powershell script to this:

docker build -t ${ECR_REGISTRY}/${ECR_REPOSITORY}:${IMAGE_TAG} .

I tried it with this simple powershell script:

$Variable1 = "Hello"
$Variable2 = "world"

Write-Host $Variable1:$Variable2

When running this script, I get the same error message like in your picture. Changing the script to the following

$Variable1 = "Hello"
$Variable2 = "world"

Write-Host ${Variable1}:${Variable2}

the script runs without any errors.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文