mirror of
https://github.com/docker/login-action.git
synced 2026-10-20 22:54:43 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3b9cdfa58 | ||
|
|
a27b71b09c | ||
|
|
2c873c3656 | ||
|
|
b4bb2a4ec0 | ||
|
|
783ae9cac5 | ||
|
|
b1725c2c93 |
@@ -35,12 +35,12 @@ jobs:
|
|||||||
node-version: ${{ env.NODE_VERSION }}
|
node-version: ${{ env.NODE_VERSION }}
|
||||||
-
|
-
|
||||||
name: Initialize CodeQL
|
name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
|
uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4.37.8
|
||||||
with:
|
with:
|
||||||
languages: javascript-typescript
|
languages: javascript-typescript
|
||||||
build-mode: none
|
build-mode: none
|
||||||
-
|
-
|
||||||
name: Perform CodeQL Analysis
|
name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
|
uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4.37.8
|
||||||
with:
|
with:
|
||||||
category: "/language:javascript-typescript"
|
category: "/language:javascript-typescript"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
targets: test
|
targets: test
|
||||||
-
|
-
|
||||||
name: Upload coverage
|
name: Upload coverage
|
||||||
uses: codecov/codecov-action@0b35c9ecc4f0529d0eb674914510c22f85b196b4 # v7.1.0
|
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||||
with:
|
with:
|
||||||
files: ./coverage/clover.xml
|
files: ./coverage/clover.xml
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|||||||
@@ -168,3 +168,23 @@ 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: auth.ecr || 'auto',
|
ecr: String(auth.ecr ?? '') || 'auto',
|
||||||
configDir: scopeToConfigDir(registry, auth.scope)
|
configDir: scopeToConfigDir(registry, auth.scope)
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user