Compare commits

...

4 Commits

Author SHA1 Message Date
CrazyMax
c6fa29c05d test
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-09-05 18:43:09 +02:00
CrazyMax
cf9719557a test
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-09-05 18:42:12 +02:00
CrazyMax
bc6da454b9 test
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-09-05 18:35:28 +02:00
CrazyMax
8474404dec test
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-09-05 18:31:56 +02:00
5 changed files with 12 additions and 14 deletions

View File

@@ -301,9 +301,11 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
add: |
- registry: ${{ secrets.GAR_LOCATION }}-docker.pkg.dev
username: _json_key
password: ${{ secrets.GAR_JSON_KEY }}
- username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- registry: public.ecr.aws
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- registry: registry.gitlab.com
username: ${{ secrets.GITLAB_USERNAME }}
password: ${{ secrets.GITLAB_TOKEN }}

2
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@@ -36,11 +36,7 @@ export async function loginStandard(registry: string, username: string, password
loginArgs.push('--username', username);
loginArgs.push(registry);
if (registry) {
core.info(`Logging into ${registry}...`);
} else {
core.info(`Logging into Docker Hub...`);
}
core.info(`Logging into ${registry}...`);
await Docker.getExecOutput(loginArgs, {
ignoreReturnCode: true,
silent: true,

View File

@@ -7,10 +7,10 @@ import * as docker from './docker';
import * as stateHelper from './state-helper';
interface Auth {
registry: string;
registry?: string;
username: string;
password: string;
ecr: string;
ecr?: string;
}
export async function main(): Promise<void> {
@@ -46,11 +46,11 @@ export async function main(): Promise<void> {
throw new Error('No registry to login');
}
if (auths.length === 1) {
await docker.login(auths[0].registry, auths[0].username, auths[0].password, auths[0].ecr || 'auto');
await docker.login(auths[0].registry || 'docker.io', auths[0].username, auths[0].password, auths[0].ecr || 'auto');
} else {
for (const auth of auths) {
await core.group(`Login to ${auth.registry || 'docker.io'}`, async () => {
await docker.login(auth.registry, auth.username, auth.password, auth.ecr || 'auto');
await docker.login(auth.registry || 'docker.io', auth.username, auth.password, auth.ecr || 'auto');
});
}
}