Skip to content

Login at a remote Docker registry, without the Docker client installed

License

Notifications You must be signed in to change notification settings

Mitigram/gh-action-docker-login

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clientless Docker Login

This action login at a remote Docker registry, without requiring the Docker client to be installed. It should otherwise behave as the official login action: it accepts the same inputs and has the same defaults. This action is meant to be used when building Docker images in dockerless environments.

Usage

To authenticate against the Docker Hub use a token, stored as a secret. The example below is shamelessly adapted from the official lead example:

name: ci

on:
  push:
    branches: main

jobs:
  login:
    runs-on: ubuntu-latest
    steps:
      -
        name: Login to Docker Hub
        uses: Mitigram/gh-action-docker-login@main
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}

Implementation Details

This action is a composite action and uses shell scripts for login/logout operations. The implemenation requires jq to be installed in the runner.

As there is no post support for composite actions, this action uses a separate action to schedule logout from the registry.

About

Login at a remote Docker registry, without the Docker client installed

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages