mirror of
https://github.com/docker/login-action.git
synced 2026-10-20 22:54:55 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f3cb3efe9 |
@@ -227,7 +227,7 @@ jobs:
|
|||||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Configure AWS Credentials
|
name: Configure AWS Credentials
|
||||||
uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6.2.3
|
uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0
|
||||||
with:
|
with:
|
||||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
@@ -255,7 +255,7 @@ jobs:
|
|||||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Configure AWS Credentials
|
name: Configure AWS Credentials
|
||||||
uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6.2.3
|
uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0
|
||||||
with:
|
with:
|
||||||
role-to-assume: arn:aws:iam::175142243308:role/official_gha_cicd_login_action
|
role-to-assume: arn:aws:iam::175142243308:role/official_gha_cicd_login_action
|
||||||
aws-region: us-east-1
|
aws-region: us-east-1
|
||||||
@@ -302,7 +302,7 @@ jobs:
|
|||||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Configure AWS Credentials
|
name: Configure AWS Credentials
|
||||||
uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6.2.3
|
uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0
|
||||||
with:
|
with:
|
||||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
@@ -331,7 +331,7 @@ jobs:
|
|||||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
-
|
-
|
||||||
name: Configure AWS Credentials
|
name: Configure AWS Credentials
|
||||||
uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6.2.3
|
uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0
|
||||||
with:
|
with:
|
||||||
role-to-assume: arn:aws:iam::175142243308:role/official_gha_cicd_login_action
|
role-to-assume: arn:aws:iam::175142243308:role/official_gha_cicd_login_action
|
||||||
aws-region: us-east-1
|
aws-region: us-east-1
|
||||||
|
|||||||
@@ -168,23 +168,3 @@ test('getAuthList masks registry-auth password when present', async () => {
|
|||||||
|
|
||||||
expect(stdoutWriteSpy.mock.calls.map(call => call[0]).join('')).toContain('::add-mask::groundcontrol');
|
expect(stdoutWriteSpy.mock.calls.map(call => call[0]).join('')).toContain('::add-mask::groundcontrol');
|
||||||
});
|
});
|
||||||
|
|
||||||
// prettier-ignore
|
|
||||||
test.each([
|
|
||||||
['false', 'false'],
|
|
||||||
['"false"', 'false'],
|
|
||||||
['true', 'true'],
|
|
||||||
['auto', 'auto'],
|
|
||||||
['""', 'auto']
|
|
||||||
])('getAuthList normalizes registry-auth ecr: %s', (ecr, expected) => {
|
|
||||||
const [auth] = getAuthList({
|
|
||||||
registry: '',
|
|
||||||
username: '',
|
|
||||||
password: '',
|
|
||||||
scope: '',
|
|
||||||
ecr: '',
|
|
||||||
logout: true,
|
|
||||||
registryAuth: `- registry: 012345678910.dkr.ecr.eu-west-3.amazonaws.com\n username: AWS\n password: token\n ecr: ${ecr}\n`
|
|
||||||
});
|
|
||||||
expect(auth.ecr).toBe(expected);
|
|
||||||
});
|
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -62,7 +62,7 @@ export function getAuthList(inputs: Inputs): Array<Auth> {
|
|||||||
username: auth.username,
|
username: auth.username,
|
||||||
password: auth.password,
|
password: auth.password,
|
||||||
scope: auth.scope,
|
scope: auth.scope,
|
||||||
ecr: String(auth.ecr ?? '') || 'auto',
|
ecr: auth.ecr || 'auto',
|
||||||
configDir: scopeToConfigDir(registry, auth.scope)
|
configDir: scopeToConfigDir(registry, auth.scope)
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user