GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Support List,CSV type for registry input · Issue #87 · docker/login-action

Support List,CSV type for registry input #87

New issue
Copy link
New issue
Copy link
Closed
#887
Closed
Support List,CSV type for registry input#87
#887
Copy link
Labels
kind/enhancement

Description

@tpolekhin
tpolekhin
opened on Jul 19, 2021
Issue body actions

Opening new issue to keep track of the implementation because original issue was closed #72

Right now we're using this action to login to IBM Cloud Container Registry in different regions:

      - name: Login to IBM Cloud Container Registry US
        uses: docker/login-action@v1
        with:
          registry: us.icr.io
          username: ${{ env.ICR_USERNAME }}
          password: ${{ env.ICR_PASSWORD }}

      - name: Login to IBM Cloud Container Registry UK
        uses: docker/login-action@v1
        with:
          registry: uk.icr.io
          username: ${{ env.ICR_USERNAME }}
          password: ${{ env.ICR_PASSWORD }}

Credentials are the same for all regions, it's just the address of the registry that differs.

Could we possibly support something like this?

      - name: Login to IBM Cloud Container Registry ALL
        uses: docker/login-action@v1
        with:
          registry: |
            us.icr.io
            uk.icr.io
            de.icr.io
            au.icr.io
            jp.icr.io
          username: ${{ env.ICR_USERNAME }}
          password: ${{ env.ICR_PASSWORD }}
Reacted by Anton Kuznietsov, Kenny Scharm, Florian Meriaux, Markus Maga, Karolis Pocius, Patrick Beekman, Abu, David Pooley and ArunKumarT1995

Activity

  1. umarcor commented on Nov 21, 2021

    @umarcor
    umarcor
    on Nov 21, 2021
    More actions

    FWIW:

    env:
      ICR_DOMAINS: us uk de au jp
    
    ...
    
        uses: ./with-post-step
        with:
          main: |
            for domain in ${{ env.ICR_DOMAINS}}; do
              echo '${{ env.ICR_PASSWORD }}' | docker login "$domain".icr.io -u '${{ env.ICR_USERNAME }}' --password-stdin
            done
          post: for domain in ${{ env.ICR_DOMAINS}}; do docker logout "$domain"; done

    where with-post-step/action.yml:

    name: With post step
    description: 'Generic JS Action to execute a main command and set a command in a post step.'
    inputs:
      main:
        description: 'Main command/script.'
        required: true
      post:
        description: 'Post command/script.'
        required: true
      key:
        description: 'Name of the state variable used to detect the post step.'
        required: false
        default: POST
    runs:
      using: 'node12'
      main: 'main.js'
      post: 'main.js'

    and with-post-step/main.js:

    const { exec } = require('child_process');
    
    function run(cmd) {
      exec(cmd, (error, stdout, stderr) => {
        if ( stdout.length != 0 ) { console.log(`${stdout}`); }
        if ( stderr.length != 0 ) { console.error(`${stderr}`); }
        if (error) {
          process.exitCode = error.code;
          console.error(`${error}`);
        }
      });
    }
    
    const key = process.env.INPUT_KEY.toUpperCase();
    
    if ( process.env[`STATE_${key}`] != undefined ) { // Are we in the 'post' step?
      run(process.env.INPUT_POST);
    } else { // Otherwise, this is the main step
      console.log(`::save-state name=${key}::true`);
      run(process.env.INPUT_MAIN);
    }
  2. crazy-max
    added
    feature request
    on Dec 19, 2021
  3. iamludal commented on Mar 8, 2023

    @iamludal
    iamludal
    on Mar 8, 2023
    More actions

    Up, would also like this feature. Have to login to multiple registries with the same credentials.

    Reacted by Abu and Rohit Thomas
  4. umarcor commented on Mar 8, 2023

    @umarcor
    umarcor
    on Mar 8, 2023
    More actions

    @iamludal you might want to check Action pyTooling/Actions/with-post-step. See: https://github.com/hdl/containers/blob/367faa2ca1c9a47912e31feadaedad35ae25abc1/utils/build-test-release/action.yml#L80-L95

  5. crazy-max
    added
    kind/enhancement
    and removed
    feature request
    on Sep 13, 2023
  6. Abdullah-Schahin commented on May 20, 2024

    @Abdullah-Schahin
    Abdullah-Schahin
    on May 20, 2024
    More actions

    @tpolekhin @iamludal @antonioua, @kscharm, @fmeriaux, @Flydiverny, @kpocius, @patrickbeekman I just released this feature here: Multi Registry Authenticator (MRA)

    I'd love to have your opinion on it and if there's something missing.

  7. mike-pt commented on Feb 11, 2025

    @mike-pt
    mike-pt
    on Feb 11, 2025
    More actions

    This would be great for GAR, we have multipe registries and with google configure docker the registry (
    https://cloud.google.com/sdk/gcloud/reference/auth/configure-docker ) this is a " comma-separated list of registries to configure the credential helper for" would be nice to have this built in "login-action"

  8. ArunKumarT1995 commented on Aug 1, 2025

    @ArunKumarT1995
    ArunKumarT1995
    on Aug 1, 2025
    More actions

    Any updates on this ? I would like have this feature too +1.

  9. ArunKumarT1995 commented on Aug 4, 2025

    @ArunKumarT1995
    ArunKumarT1995
    on Aug 4, 2025
    More actions

    I have created #877 for multi registry login. Can any maintainers review ?

  10. tonistiigi
    closed this as completedin #887on Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.