This Action enables bulk login to multiple container registries at once
When using the official login action provided by Docker, there is no possibility to login into multiple registries at once.
Therefore, I wanted to enable this feature and eliminate the need to run the login action N times within a workflow.
The action works very simple. It loops over a semicolon separated string of registries and logs into them.
This action in its 1st version does not support logout from registries as post job stage. This feature will be supported soon in the 2nd version.
Using this Action is just as simple as using the official Docker/login-action.
Caution
Please store registry access credentials in a secure place such as GitHub Secrets
registries
:- Required: Yes
- Description: A Multi-line string containing all registries to log into. Each in the format:
REGISTRY_HOST;USERNAME;PASSWORD
Below is an example on how to use this action in your workflow:
...
steps:
- name: Login to GitHub Container Registry
uses: Abdullah-Shahen/MRA@v1 # Please use full commit hash of the version tag
with:
registries: |
ghcr.io;${{ secrets.GHCR_USERNAME }};${{ secrets.GHCR_PASSWORD }}
registry.gitlab.com;${{ secrets.GITLAB_USERNAME }};${{ secrets.GITLAB_PASSWORD }}
...