No description
  • Dockerfile 100%
Find a file
2025-08-08 18:43:29 +03:00
action.yml Revert to working context 2025-08-08 18:43:29 +03:00
Dockerfile Initial commit 2025-08-08 16:39:02 +03:00
README.md Fix var names 2025-08-08 18:31:43 +03:00

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