mirror of
https://github.com/docker/build-push-action.git
synced 2025-05-15 23:39:31 +02:00
Merge pull request #1364 from crazy-max/history-export-cmd
Bump @docker/actions-toolkit from 0.59.0 to 0.61.0
This commit is contained in:
commit
1dc7386353
29
.github/workflows/ci.yml
vendored
29
.github/workflows/ci.yml
vendored
@ -1464,6 +1464,35 @@ jobs:
|
||||
env:
|
||||
DOCKER_BUILD_RECORD_RETENTION_DAYS: ${{ matrix.days }}
|
||||
|
||||
export-legacy:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
legacy:
|
||||
- false
|
||||
- true
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: action
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
||||
driver-opts: |
|
||||
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
||||
-
|
||||
name: Build
|
||||
uses: ./action
|
||||
with:
|
||||
file: ./test/Dockerfile
|
||||
env:
|
||||
DOCKER_BUILD_EXPORT_LEGACY: ${{ matrix.legacy }}
|
||||
|
||||
checks:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
|
@ -277,6 +277,7 @@ The following outputs are available:
|
||||
| `DOCKER_BUILD_SUMMARY` | Bool | `true` | If `false`, [build summary](https://docs.docker.com/build/ci/github-actions/build-summary/) generation is disabled |
|
||||
| `DOCKER_BUILD_RECORD_UPLOAD` | Bool | `true` | If `false`, build record upload as [GitHub artifact](https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts) is disabled |
|
||||
| `DOCKER_BUILD_RECORD_RETENTION_DAYS` | Number | | Duration after which build record artifact will expire in days. Defaults to repository/org [retention settings](https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#artifact-and-log-retention-policy) if unset or `0` |
|
||||
| `DOCKER_BUILD_EXPORT_LEGACY` | Bool | `false` | If `true`, exports build using legacy export-build tool instead of [`buildx history export` command](https://docs.docker.com/reference/cli/docker/buildx/history/export/) |
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@ -27,7 +27,7 @@
|
||||
"packageManager": "yarn@3.6.3",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.11.1",
|
||||
"@docker/actions-toolkit": "0.59.0",
|
||||
"@docker/actions-toolkit": "0.61.0",
|
||||
"handlebars": "^4.7.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
10
src/main.ts
10
src/main.ts
@ -200,7 +200,8 @@ actionsToolkit.run(
|
||||
|
||||
const buildxHistory = new BuildxHistory();
|
||||
const exportRes = await buildxHistory.export({
|
||||
refs: stateHelper.buildRef ? [stateHelper.buildRef] : []
|
||||
refs: stateHelper.buildRef ? [stateHelper.buildRef] : [],
|
||||
useContainer: buildExportLegacy()
|
||||
});
|
||||
core.info(`Build record written to ${exportRes.dockerbuildFilename} (${Util.formatFileSize(exportRes.dockerbuildSize)})`);
|
||||
|
||||
@ -294,3 +295,10 @@ function buildRecordRetentionDays(): number | undefined {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
function buildExportLegacy(): boolean {
|
||||
if (process.env.DOCKER_BUILD_EXPORT_LEGACY) {
|
||||
return Util.parseBool(process.env.DOCKER_BUILD_EXPORT_LEGACY);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
10
yarn.lock
10
yarn.lock
@ -1072,9 +1072,9 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@docker/actions-toolkit@npm:0.59.0":
|
||||
version: 0.59.0
|
||||
resolution: "@docker/actions-toolkit@npm:0.59.0"
|
||||
"@docker/actions-toolkit@npm:0.61.0":
|
||||
version: 0.61.0
|
||||
resolution: "@docker/actions-toolkit@npm:0.61.0"
|
||||
dependencies:
|
||||
"@actions/artifact": ^2.3.2
|
||||
"@actions/cache": ^4.0.3
|
||||
@ -1097,7 +1097,7 @@ __metadata:
|
||||
semver: ^7.7.1
|
||||
tar-stream: ^3.1.7
|
||||
tmp: ^0.2.3
|
||||
checksum: 0956071aa04e04132b789d47ba57813c566115bea9fdedf3c648d0a0da8ce12350de9cd2a796ce1da7b64b995ae073bfe344b0f63c6f331a45e60195e15680a6
|
||||
checksum: 60cc6c8f5bde8221a3d6a40c15258d44a468950353098f1814d8af3a14131df9c41df5b87298cd82f5c77aa4e36e262c15a5bb0cc03ea2857bea18c9e0952d80
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -3143,7 +3143,7 @@ __metadata:
|
||||
resolution: "docker-build-push@workspace:."
|
||||
dependencies:
|
||||
"@actions/core": ^1.11.1
|
||||
"@docker/actions-toolkit": 0.59.0
|
||||
"@docker/actions-toolkit": 0.61.0
|
||||
"@types/node": ^20.12.12
|
||||
"@typescript-eslint/eslint-plugin": ^7.9.0
|
||||
"@typescript-eslint/parser": ^7.9.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user