mirror of
https://github.com/docker/build-push-action.git
synced 2025-06-17 08:27:12 +02:00
Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
4a531fa5a6 | |||
565d16e074 | |||
c473874c2c | |||
b94cedd686 | |||
76c8b42a58 | |||
920f0da143 | |||
e723b420bf | |||
f9deaa080c | |||
b4c22c3e33 | |||
a8587cb818 | |||
f2a733f179 | |||
35ab0dd217 | |||
46d5afd128 | |||
a8bb35be5a | |||
5c278cd8ab | |||
3b98ff3c03 | |||
6b88c3e647 |
34
.github/labels.yml
vendored
34
.github/labels.yml
vendored
@ -68,7 +68,6 @@
|
|||||||
name: ":question: question"
|
name: ":question: question"
|
||||||
color: "3f51b5"
|
color: "3f51b5"
|
||||||
description: ""
|
description: ""
|
||||||
from_name: "question"
|
|
||||||
- # upstream
|
- # upstream
|
||||||
name: ":eyes: upstream"
|
name: ":eyes: upstream"
|
||||||
color: "fbca04"
|
color: "fbca04"
|
||||||
@ -77,3 +76,36 @@
|
|||||||
name: ":coffin: wontfix"
|
name: ":coffin: wontfix"
|
||||||
color: "ffffff"
|
color: "ffffff"
|
||||||
description: ""
|
description: ""
|
||||||
|
|
||||||
|
- # registry-aws-ecr
|
||||||
|
name: "registry-aws-ecr"
|
||||||
|
color: "84858A"
|
||||||
|
description: ""
|
||||||
|
- # registry-azure-acr
|
||||||
|
name: "registry-azure-acr"
|
||||||
|
color: "84858A"
|
||||||
|
description: ""
|
||||||
|
- # registry-dockerhub
|
||||||
|
name: "registry-dockerhub"
|
||||||
|
color: "84858A"
|
||||||
|
description: ""
|
||||||
|
- # registry-github
|
||||||
|
name: "registry-github"
|
||||||
|
color: "84858A"
|
||||||
|
description: ""
|
||||||
|
- # registry-google-gar
|
||||||
|
name: "registry-google-gar"
|
||||||
|
color: "84858A"
|
||||||
|
description: ""
|
||||||
|
- # registry-google-gcr
|
||||||
|
name: "registry-google-gcr"
|
||||||
|
color: "84858A"
|
||||||
|
description: ""
|
||||||
|
- # registry-nexus
|
||||||
|
name: "registry-nexus"
|
||||||
|
color: "84858A"
|
||||||
|
description: ""
|
||||||
|
- # registry-quay
|
||||||
|
name: "registry-quay"
|
||||||
|
color: "84858A"
|
||||||
|
description: ""
|
||||||
|
22
.github/workflows/e2e.yml
vendored
22
.github/workflows/e2e.yml
vendored
@ -32,6 +32,26 @@ jobs:
|
|||||||
slug: registry.gitlab.com/test1716/test
|
slug: registry.gitlab.com/test1716/test
|
||||||
username_secret: GITLAB_USERNAME
|
username_secret: GITLAB_USERNAME
|
||||||
password_secret: GITLAB_TOKEN
|
password_secret: GITLAB_TOKEN
|
||||||
|
-
|
||||||
|
registry: 175142243308.dkr.ecr.us-east-2.amazonaws.com
|
||||||
|
slug: 175142243308.dkr.ecr.us-east-2.amazonaws.com/sandbox/test-docker-action
|
||||||
|
username_secret: AWS_ACCESS_KEY_ID
|
||||||
|
password_secret: AWS_SECRET_ACCESS_KEY
|
||||||
|
-
|
||||||
|
registry: public.ecr.aws
|
||||||
|
slug: public.ecr.aws/q3b5f1u4/test-docker-action
|
||||||
|
username_secret: AWS_ACCESS_KEY_ID
|
||||||
|
password_secret: AWS_SECRET_ACCESS_KEY
|
||||||
|
-
|
||||||
|
registry: us-east4-docker.pkg.dev
|
||||||
|
slug: us-east4-docker.pkg.dev/sandbox-298914/docker-official-github-actions/test-docker-action
|
||||||
|
username_secret: GAR_USERNAME
|
||||||
|
password_secret: GAR_JSON_KEY
|
||||||
|
-
|
||||||
|
registry: gcr.io
|
||||||
|
slug: gcr.io/sandbox-298914/test-docker-action
|
||||||
|
username_secret: GCR_USERNAME
|
||||||
|
password_secret: GCR_JSON_KEY
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
@ -66,6 +86,8 @@ jobs:
|
|||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.docker_meta.outputs.tags }}
|
tags: ${{ steps.docker_meta.outputs.tags }}
|
||||||
labels: ${{ steps.docker_meta.outputs.labels }}
|
labels: ${{ steps.docker_meta.outputs.labels }}
|
||||||
|
cache-from: type=registry,ref=${{ matrix.slug }}:master
|
||||||
|
cache-to: type=inline
|
||||||
-
|
-
|
||||||
name: Inspect image
|
name: Inspect image
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
|
@ -35,7 +35,7 @@ ___
|
|||||||
* [Multi-platform image](#multi-platform-image)
|
* [Multi-platform image](#multi-platform-image)
|
||||||
* [Advanced usage](#advanced-usage)
|
* [Advanced usage](#advanced-usage)
|
||||||
* [Push to multi-registries](#push-to-multi-registries)
|
* [Push to multi-registries](#push-to-multi-registries)
|
||||||
* [Cache to registry](#push-to-multi-registries)
|
* [Cache to registry](#cache-to-registry)
|
||||||
* [Local registry](#local-registry)
|
* [Local registry](#local-registry)
|
||||||
* [Export image to Docker](#export-image-to-docker)
|
* [Export image to Docker](#export-image-to-docker)
|
||||||
* [Leverage GitHub cache](#leverage-github-cache)
|
* [Leverage GitHub cache](#leverage-github-cache)
|
||||||
@ -608,7 +608,7 @@ Following inputs can be used as `step.with` keys
|
|||||||
|---------------------|----------|------------------------------------|
|
|---------------------|----------|------------------------------------|
|
||||||
| `builder` | String | Builder instance (see [setup-buildx](https://github.com/docker/setup-buildx-action) action) |
|
| `builder` | String | Builder instance (see [setup-buildx](https://github.com/docker/setup-buildx-action) action) |
|
||||||
| `context` | String | Build's context is the set of files located in the specified [`PATH` or `URL`](https://docs.docker.com/engine/reference/commandline/build/) (default [Git context](#git-context)) |
|
| `context` | String | Build's context is the set of files located in the specified [`PATH` or `URL`](https://docs.docker.com/engine/reference/commandline/build/) (default [Git context](#git-context)) |
|
||||||
| `file` | String | Path to the Dockerfile (default `./Dockerfile`) |
|
| `file` | String | Path to the Dockerfile. (default `{context}/Dockerfile`) |
|
||||||
| `build-args` | List | List of build-time variables |
|
| `build-args` | List | List of build-time variables |
|
||||||
| `labels` | List | List of metadata for an image |
|
| `labels` | List | List of metadata for an image |
|
||||||
| `tags` | List/CSV | List of tags |
|
| `tags` | List/CSV | List of tags |
|
||||||
|
@ -147,7 +147,6 @@ describe('getArgs', () => {
|
|||||||
'buildx',
|
'buildx',
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
|
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
|
||||||
'--file', 'Dockerfile',
|
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
@ -162,7 +161,6 @@ describe('getArgs', () => {
|
|||||||
'--build-arg', 'MY_ARG=val1,val2,val3',
|
'--build-arg', 'MY_ARG=val1,val2,val3',
|
||||||
'--build-arg', 'ARG=val',
|
'--build-arg', 'ARG=val',
|
||||||
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
|
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
|
||||||
'--file', 'Dockerfile',
|
|
||||||
'https://github.com/docker/build-push-action.git#test-jest'
|
'https://github.com/docker/build-push-action.git#test-jest'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
@ -177,7 +175,6 @@ describe('getArgs', () => {
|
|||||||
'--tag', 'name/app:7.4',
|
'--tag', 'name/app:7.4',
|
||||||
'--tag', 'name/app:latest',
|
'--tag', 'name/app:latest',
|
||||||
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
|
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
|
||||||
'--file', 'Dockerfile',
|
|
||||||
'https://github.com/docker/build-push-action.git#test-jest'
|
'https://github.com/docker/build-push-action.git#test-jest'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
@ -194,7 +191,6 @@ describe('getArgs', () => {
|
|||||||
'--label', 'org.opencontainers.image.title=buildkit',
|
'--label', 'org.opencontainers.image.title=buildkit',
|
||||||
'--label', 'org.opencontainers.image.description=concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit',
|
'--label', 'org.opencontainers.image.description=concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit',
|
||||||
'--output', 'type=local,dest=./release-out',
|
'--output', 'type=local,dest=./release-out',
|
||||||
'--file', 'Dockerfile',
|
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
@ -208,7 +204,6 @@ describe('getArgs', () => {
|
|||||||
'buildx',
|
'buildx',
|
||||||
'build',
|
'build',
|
||||||
'--platform', 'linux/amd64,linux/arm64',
|
'--platform', 'linux/amd64,linux/arm64',
|
||||||
'--file', 'Dockerfile',
|
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
@ -221,7 +216,6 @@ describe('getArgs', () => {
|
|||||||
'buildx',
|
'buildx',
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
|
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
|
||||||
'--file', 'Dockerfile',
|
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
@ -236,7 +230,6 @@ describe('getArgs', () => {
|
|||||||
'build',
|
'build',
|
||||||
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
|
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
|
||||||
'--secret', 'id=GIT_AUTH_TOKEN,src=/tmp/.docker-build-push-jest/.tmpname-jest',
|
'--secret', 'id=GIT_AUTH_TOKEN,src=/tmp/.docker-build-push-jest/.tmpname-jest',
|
||||||
'--file', 'Dockerfile',
|
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
@ -251,7 +244,6 @@ describe('getArgs', () => {
|
|||||||
'build',
|
'build',
|
||||||
'--output', '.',
|
'--output', '.',
|
||||||
'--secret', 'id=GIT_AUTH_TOKEN,src=/tmp/.docker-build-push-jest/.tmpname-jest',
|
'--secret', 'id=GIT_AUTH_TOKEN,src=/tmp/.docker-build-push-jest/.tmpname-jest',
|
||||||
'--file', 'Dockerfile',
|
|
||||||
'https://github.com/docker/build-push-action.git#test-jest'
|
'https://github.com/docker/build-push-action.git#test-jest'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -16,7 +16,6 @@ inputs:
|
|||||||
file:
|
file:
|
||||||
description: "Path to the Dockerfile"
|
description: "Path to the Dockerfile"
|
||||||
required: false
|
required: false
|
||||||
default: './Dockerfile'
|
|
||||||
build-args:
|
build-args:
|
||||||
description: "List of build-time variables"
|
description: "List of build-time variables"
|
||||||
required: false
|
required: false
|
||||||
|
11
dist/index.js
generated
vendored
11
dist/index.js
generated
vendored
@ -12406,7 +12406,6 @@ class Parser extends Transform {
|
|||||||
}
|
}
|
||||||
if(recordLength !== this.state.expectedRecordLength){
|
if(recordLength !== this.state.expectedRecordLength){
|
||||||
const err = columns === false ?
|
const err = columns === false ?
|
||||||
this.__error(
|
|
||||||
// Todo: rename CSV_INCONSISTENT_RECORD_LENGTH to
|
// Todo: rename CSV_INCONSISTENT_RECORD_LENGTH to
|
||||||
// CSV_RECORD_INCONSISTENT_FIELDS_LENGTH
|
// CSV_RECORD_INCONSISTENT_FIELDS_LENGTH
|
||||||
new CsvError('CSV_INCONSISTENT_RECORD_LENGTH', [
|
new CsvError('CSV_INCONSISTENT_RECORD_LENGTH', [
|
||||||
@ -12416,9 +12415,7 @@ class Parser extends Transform {
|
|||||||
], this.options, this.__context(), {
|
], this.options, this.__context(), {
|
||||||
record: record,
|
record: record,
|
||||||
})
|
})
|
||||||
)
|
|
||||||
:
|
:
|
||||||
this.__error(
|
|
||||||
// Todo: rename CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH to
|
// Todo: rename CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH to
|
||||||
// CSV_RECORD_INCONSISTENT_COLUMNS
|
// CSV_RECORD_INCONSISTENT_COLUMNS
|
||||||
new CsvError('CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH', [
|
new CsvError('CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH', [
|
||||||
@ -12428,15 +12425,15 @@ class Parser extends Transform {
|
|||||||
], this.options, this.__context(), {
|
], this.options, this.__context(), {
|
||||||
record: record,
|
record: record,
|
||||||
})
|
})
|
||||||
)
|
|
||||||
if(relax_column_count === true ||
|
if(relax_column_count === true ||
|
||||||
(relax_column_count_less === true && recordLength < this.state.expectedRecordLength) ||
|
(relax_column_count_less === true && recordLength < this.state.expectedRecordLength) ||
|
||||||
(relax_column_count_more === true && recordLength > this.state.expectedRecordLength) ){
|
(relax_column_count_more === true && recordLength > this.state.expectedRecordLength) ){
|
||||||
this.info.invalid_field_length++
|
this.info.invalid_field_length++
|
||||||
this.state.error = err
|
this.state.error = err
|
||||||
// Error is undefined with skip_lines_with_error
|
// Error is undefined with skip_lines_with_error
|
||||||
}else if(err !== undefined){
|
}else{
|
||||||
return err
|
const finalErr = this.__error(err)
|
||||||
|
if(finalErr) return finalErr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(skip_lines_with_empty_values === true){
|
if(skip_lines_with_empty_values === true){
|
||||||
@ -12990,7 +12987,7 @@ function getInputs(defaultContext) {
|
|||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
return {
|
return {
|
||||||
context: core.getInput('context') || defaultContext,
|
context: core.getInput('context') || defaultContext,
|
||||||
file: core.getInput('file') || 'Dockerfile',
|
file: core.getInput('file'),
|
||||||
buildArgs: yield getInputList('build-args', true),
|
buildArgs: yield getInputList('build-args', true),
|
||||||
labels: yield getInputList('labels', true),
|
labels: yield getInputList('labels', true),
|
||||||
tags: yield getInputList('tags'),
|
tags: yield getInputList('tags'),
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.2.6",
|
||||||
"@actions/exec": "^1.0.4",
|
"@actions/exec": "^1.0.4",
|
||||||
"@actions/github": "^4.0.0",
|
"@actions/github": "^4.0.0",
|
||||||
"csv-parse": "^4.14.1",
|
"csv-parse": "^4.14.2",
|
||||||
"semver": "^7.3.4",
|
"semver": "^7.3.4",
|
||||||
"tmp": "^0.2.1"
|
"tmp": "^0.2.1"
|
||||||
},
|
},
|
||||||
|
@ -57,7 +57,7 @@ export function tmpNameSync(options?: tmp.TmpNameOptions): string {
|
|||||||
export async function getInputs(defaultContext: string): Promise<Inputs> {
|
export async function getInputs(defaultContext: string): Promise<Inputs> {
|
||||||
return {
|
return {
|
||||||
context: core.getInput('context') || defaultContext,
|
context: core.getInput('context') || defaultContext,
|
||||||
file: core.getInput('file') || 'Dockerfile',
|
file: core.getInput('file'),
|
||||||
buildArgs: await getInputList('build-args', true),
|
buildArgs: await getInputList('build-args', true),
|
||||||
labels: await getInputList('labels', true),
|
labels: await getInputList('labels', true),
|
||||||
tags: await getInputList('tags'),
|
tags: await getInputList('tags'),
|
||||||
|
@ -1236,10 +1236,10 @@ cssstyle@^2.2.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
cssom "~0.3.6"
|
cssom "~0.3.6"
|
||||||
|
|
||||||
csv-parse@*, csv-parse@^4.14.1:
|
csv-parse@*, csv-parse@^4.14.2:
|
||||||
version "4.14.1"
|
version "4.14.2"
|
||||||
resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-4.14.1.tgz#b6b3736508fb94682fa6d450fe1755237221d291"
|
resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-4.14.2.tgz#c1329cff95a99b8773a92c4e62f8bff114b34726"
|
||||||
integrity sha512-4wmcO7QbWtDAncGFaBwlWFPhEN4Akr64IbM4zvDwEOFekI8blLc04Nw7XjQjtSNy+3AUAgBgtUa9nWo5Cq89Xg==
|
integrity sha512-YE2xlTKtM035/94llhgsp9qFQxGi47EkQJ1pZ+mLT/98GpIsbjkMGAb7Rmu9hNxVfYFOLf10hP+rPVqnoccLgw==
|
||||||
|
|
||||||
dashdash@^1.12.0:
|
dashdash@^1.12.0:
|
||||||
version "1.14.1"
|
version "1.14.1"
|
||||||
|
Reference in New Issue
Block a user