Koh*_*ini 2 docker github-actions github-actions-self-hosted-runners
我使用自托管运行程序而不是 Github 运行程序来执行 Github 操作,因为自托管运行程序将有权访问专用网络。我还将在自托管运行器之上使用容器。
从链接 https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
可以将 设定runs-on为ubuntu-latest。我认为这与https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.mddocker pull ubuntu中预装的软件是相同的图像
ubuntu-latest但 docker hub 上的 ubuntu 镜像与Github 托管运行器使用的镜像不同。在哪里可以找到 Github runner 使用的 docker 镜像?
配置自托管运行器并安装 docker 引擎后,我尝试了下面的工作流程。然而它失败了,没有图像ubuntu-latest
jobs:
build:
runs-on: self-hosted
container:
image: ubuntu-latest
steps:
- run: echo " The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo " This job is now running on a ${{ runner.os }} server !"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2569 次 |
| 最近记录: |