No description
- Dockerfile 100%
| action.yml | ||
| Dockerfile | ||
| README.md | ||
Container Registry login action
This action generates a standard JSON file used by multiple tools for authenticating to container registries.
In the repo is included an example Dockerfile for use with this action, the only dependencies are jq, echo and bash.
Warning
Tested only using Forgejo Actions, compatibility with other Action runners is not tested.
Inputs:
| parameter | description | required | default |
|---|---|---|---|
| user | User name or ID used for authentication to the container registry | false | ${{ github.actor }} |
| token | Token used for authentication to the container registry | false | ${{ github.token }} |
| debug | If true print debug information | false | false |
| url | URL to the container registry | false | ${{ github.server_url }} |
| File | File path where the generated json file is written to | false | /root/.docker/config.json |
Usage
- name: "Container registry login"
uses: https://git.anikiforov.dev/actions/registry-login@main
with:
# User name or ID used for authentication to the container registry.
# Default is the user who initiated the workflow
user: "${{ github.actor }}"
# Token used for the assigning request.
# Default is the autogenerated token
token: "${{ github.token }}"
# If true print debug information
# Default is "false"
debug: "false"
# URL to the container registry
# Default is the host on which the workflow runs.
url: "${{ github.server_url }}"
# File path where the generated json file is written to.
# Default is '/root/.docker/config.json'
file: "/root/.docker/config.json"
Example workflow
name: "Registry login"
on:
pull_request:
types:
- opened
jobs:
registry-login:
runs-on: shared
container:
image: git.anikiforov.dev/actions/registry-login/registry-login-helper:latest
credentials:
username: "${{ github.actor }}"
password: "${{ secrets.GITHUB_TOKEN }}"
steps:
- name: "Registry login"
id: registry-login
uses: https://git.anikiforov.dev/actions/registry-login@main