docker - $GITHUB_OUTPUT - 目录不存在(自托管运行器)

标签 docker dockerfile github-actions github-actions-self-hosted-runners

我正在尝试使用 $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/

相关文章:

docker - 有没有一种方法可以从容器内部使docker config可编辑?

python - 无法在 Ubuntu 中使用 setup.py 中的 Github Actions 安装 Tensorflow 2.2.0rc0

github - 有没有办法在运行 gh 操作时获取工作流程 ID

docker - 使用 Jenkins 管道构建 Docker 镜像时如何解决 "Cannot retrieve .Id from docker"

nginx - Lucee 5,Nginx和Docker Compose找不到示例index.cfm文件

docker - 在 docker 中使用环境变量

mysql - 在 Docker 中持久化 MySQL 数据

c - 无法在 docker 镜像上执行 arm-cc ( ubuntu 12.04 base )

docker - yaml-cpp库在docker中的安装