我正在尝试使用 $GITHUB_OUTPUT 而不是 set-output。
我根据官方教程用docker文件搭建了一个简单的GitHub Action。
# Container image that runs your code
FROM alpine:latest
# Copies your code file from your action repository to the filesystem path `/` of the container
COPY entrypoint.sh /entrypoint.sh
# Code file to execute when the docker container starts up (`entrypoint.sh`)
ENTRYPOINT ["/entrypoint.sh"]
入口点.sh是
#!/bin/sh -l
time=$(date)
echo "time=$time" >> $GITHUB_OUTPUT
在自托管的 Debian 运行器中执行此操作会生成一个
/entrypoint.sh: 4: cannot create : Directory nonexistent
使用通常的::set-output 更改 $GITHUB_OUTPUT 可以正常工作。
关于如何解决这个问题有什么想法吗?
最佳答案
set-output 的弃用是 mentioned recently (oct. 2022)
If you are using self-hosted runners make sure they are updated to version 2.297.0 or greater.
所以首先检查你的运行者的版本。
关于docker - $GITHUB_OUTPUT - 目录不存在(自托管运行器),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74149193/