mirror of
https://github.com/docker/login-action.git
synced 2026-10-20 14:26:39 +08:00
Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3b9cdfa58 | ||
|
|
a27b71b09c | ||
|
|
2c873c3656 | ||
|
|
b4bb2a4ec0 | ||
|
|
783ae9cac5 | ||
|
|
b1725c2c93 | ||
|
|
0a596b2e7a | ||
|
|
5d1ee94869 |
@@ -0,0 +1,3 @@
|
||||
FROM docker:29.3@sha256:4d90f1f6c400315c2dba96d3ec93c01e64198395cbba04f79d12adce4f737029
|
||||
|
||||
ENTRYPOINT ["docker"]
|
||||
@@ -0,0 +1,15 @@
|
||||
name: Pull Docker image
|
||||
|
||||
description: Pull an image from a Docker container action
|
||||
|
||||
inputs:
|
||||
image:
|
||||
description: Image reference to pull
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: docker
|
||||
image: Dockerfile
|
||||
args:
|
||||
- pull
|
||||
- ${{ inputs.image }}
|
||||
@@ -106,11 +106,10 @@ jobs:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
-
|
||||
name: DinD
|
||||
uses: docker://docker:29.3@sha256:4d90f1f6c400315c2dba96d3ec93c01e64198395cbba04f79d12adce4f737029
|
||||
name: Pull test image from Docker CLI container action
|
||||
uses: ./.github/actions/docker-pull
|
||||
with:
|
||||
entrypoint: docker
|
||||
args: pull ${{ env.GHCR_TEST_IMAGE }}
|
||||
image: ${{ env.GHCR_TEST_IMAGE }}
|
||||
-
|
||||
name: Pull test image
|
||||
run: |
|
||||
|
||||
@@ -35,12 +35,12 @@ jobs:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
-
|
||||
name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
|
||||
uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4.37.8
|
||||
with:
|
||||
languages: javascript-typescript
|
||||
build-mode: none
|
||||
-
|
||||
name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
|
||||
uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4.37.8
|
||||
with:
|
||||
category: "/language:javascript-typescript"
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
|
||||
// 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,
|
||||
password: auth.password,
|
||||
scope: auth.scope,
|
||||
ecr: auth.ecr || 'auto',
|
||||
ecr: String(auth.ecr ?? '') || 'auto',
|
||||
configDir: scopeToConfigDir(registry, auth.scope)
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user