访问 GitHub Action 的私有镜像注册表

rhe*_*0b1 5 docker github-actions

有没有办法使用注册表中的私有映像以及自定义 GitHub Docker 容器操作的身份验证?想要将 running.image 指向私有 docker 映像。理想情况下,上传到 GitHub Packages 注册表的一个。

# action.yml
name: 'Hello World'
description: 'Greet someone'
inputs:
  who_to_greet:  # id of input
    description: 'Who to greet'
    required: true
    default: 'World'
outputs:
  time: # id of output
    description: 'The time we greeted you'
runs:
  using: 'docker'
  image: 'Dockerfile'
  args:
    - ${{ inputs.who_to_greet }}
Run Code Online (Sandbox Code Playgroud)

https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action