Compare commits

..

6 Commits

Author SHA1 Message Date
CrazyMax
60f5d53310 Merge pull request #286 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.51.0
Some checks failed
ci / set (push) Has been cancelled
ci / group (push) Has been cancelled
ci / docker-config-malformed (push) Has been cancelled
ci / proxy-docker-config (push) Has been cancelled
ci / proxy-buildkitd (push) Has been cancelled
ci / git-context (push) Has been cancelled
ci / git-context-and-local (push) Has been cancelled
ci / multi-output (push) Has been cancelled
ci / load-and-push (push) Has been cancelled
ci / summary-disable (push) Has been cancelled
ci / summary-disable-deprecated (push) Has been cancelled
ci / summary-not-supported (push) Has been cancelled
ci / record-upload-disable (push) Has been cancelled
ci / record-retention-days (0) (push) Has been cancelled
ci / record-retention-days (2) (push) Has been cancelled
ci / standalone (push) Has been cancelled
ci / remote (push) Has been cancelled
ci / provenance () (push) Has been cancelled
ci / provenance (builder-id=foo) (push) Has been cancelled
ci / provenance (false) (push) Has been cancelled
ci / provenance (mode=max) (push) Has been cancelled
ci / provenance (true) (push) Has been cancelled
ci / sbom (/tmp/bake-build, binary) (push) Has been cancelled
ci / sbom (type=image,name=localhost:5000/name/app:latest,push=true, image) (push) Has been cancelled
ci / checks (latest) (push) Has been cancelled
ci / checks (v0.14.1) (push) Has been cancelled
ci / annotations-disabled (push) Has been cancelled
ci / allow (v0.17.1) (push) Has been cancelled
ci / allow (v0.18.0) (push) Has been cancelled
ci / allow (v0.19.0-rc2) (push) Has been cancelled
chore(deps): Bump @docker/actions-toolkit from 0.50.0 to 0.51.0
2025-01-15 13:44:14 +01:00
CrazyMax
cb84b96ea2 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-01-15 13:35:14 +01:00
dependabot[bot]
63a0b90c7c chore(deps): Bump @docker/actions-toolkit from 0.50.0 to 0.51.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.50.0 to 0.51.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.50.0...v0.51.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-15 12:07:30 +00:00
CrazyMax
5dd4f8e2d6 Merge pull request #285 from crazy-max/revert-git-auth-token
Some checks failed
ci / provenance (mode=max) (push) Has been cancelled
ci / provenance (true) (push) Has been cancelled
ci / sbom (/tmp/bake-build, binary) (push) Has been cancelled
ci / sbom (type=image,name=localhost:5000/name/app:latest,push=true, image) (push) Has been cancelled
ci / set (push) Has been cancelled
ci / group (push) Has been cancelled
ci / docker-config-malformed (push) Has been cancelled
ci / proxy-docker-config (push) Has been cancelled
ci / proxy-buildkitd (push) Has been cancelled
ci / git-context (push) Has been cancelled
ci / git-context-and-local (push) Has been cancelled
ci / multi-output (push) Has been cancelled
ci / load-and-push (push) Has been cancelled
ci / summary-disable (push) Has been cancelled
ci / summary-disable-deprecated (push) Has been cancelled
ci / summary-not-supported (push) Has been cancelled
ci / standalone (push) Has been cancelled
ci / remote (push) Has been cancelled
ci / provenance () (push) Has been cancelled
ci / provenance (builder-id=foo) (push) Has been cancelled
ci / provenance (false) (push) Has been cancelled
ci / record-upload-disable (push) Has been cancelled
ci / record-retention-days (0) (push) Has been cancelled
ci / record-retention-days (2) (push) Has been cancelled
ci / checks (latest) (push) Has been cancelled
ci / checks (v0.14.1) (push) Has been cancelled
ci / annotations-disabled (push) Has been cancelled
ci / allow (v0.17.1) (push) Has been cancelled
ci / allow (v0.18.0) (push) Has been cancelled
ci / allow (v0.19.0-rc2) (push) Has been cancelled
Revert "set GIT_AUTH_TOKEN secret if Git context used"
2025-01-14 14:52:03 +01:00
CrazyMax
8342e4814b Revert "set GIT_AUTH_TOKEN secret if Git context used"
This reverts commit 932b78563b.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-01-14 14:38:19 +01:00
CrazyMax
4e1bb14d4e Revert "chore: update generated content"
This reverts commit a23a0ceb07.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-01-14 14:38:19 +01:00
7 changed files with 10 additions and 24 deletions

View File

@@ -729,7 +729,6 @@ jobs:
name: Build
uses: ./
with:
source: .
files: |
./test/config.hcl
allow: network.host

4
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@@ -27,7 +27,7 @@
"packageManager": "yarn@3.6.3",
"dependencies": {
"@actions/core": "^1.11.1",
"@docker/actions-toolkit": "^0.50.0",
"@docker/actions-toolkit": "^0.51.0",
"handlebars": "^4.7.8"
},
"devDependencies": {

View File

@@ -68,10 +68,6 @@ export function sanitizeInputs(inputs: Inputs) {
return res;
}
export function getGitAuthToken(inputs: Inputs): string {
return process.env.BUILDX_BAKE_GIT_AUTH_TOKEN ?? inputs['github-token'];
}
export async function getArgs(inputs: Inputs, definition: BakeDefinition, toolkit: Toolkit): Promise<Array<string>> {
// prettier-ignore
return [
@@ -101,15 +97,6 @@ async function getBakeArgs(inputs: Inputs, definition: BakeDefinition, toolkit:
await Util.asyncForEach(inputs.set, async set => {
args.push('--set', set);
});
if (await toolkit.buildx.versionSatisfies('<0.20.0')) {
// For buildx versions < 0.20.0, we need to set GIT_AUTH_TOKEN secret as it
// doesn't infer BUILDX_BAKE_GIT_AUTH_TOKEN environment variable for build
// request: https://github.com/docker/buildx/pull/2905
const gitAuthToken = getGitAuthToken(inputs);
if (gitAuthToken && !Bake.hasGitAuthTokenSecret(definition) && inputs.source.startsWith(Context.gitContext())) {
args.push('--set', `*.secrets=${Build.resolveSecretString(`GIT_AUTH_TOKEN=${gitAuthToken}`)}`);
}
}
if (await toolkit.buildx.versionSatisfies('>=0.6.0')) {
args.push('--metadata-file', toolkit.buildxBake.getMetadataFilePath());
}

View File

@@ -30,7 +30,7 @@ actionsToolkit.run(
stateHelper.setInputs(inputs);
const toolkit = new Toolkit();
const gitAuthToken = context.getGitAuthToken(inputs);
const gitAuthToken = process.env.BUILDX_BAKE_GIT_AUTH_TOKEN ?? inputs['github-token'];
await core.group(`GitHub Actions runtime token ACs`, async () => {
try {

View File

@@ -1066,9 +1066,9 @@ __metadata:
languageName: node
linkType: hard
"@docker/actions-toolkit@npm:^0.50.0":
version: 0.50.0
resolution: "@docker/actions-toolkit@npm:0.50.0"
"@docker/actions-toolkit@npm:^0.51.0":
version: 0.51.0
resolution: "@docker/actions-toolkit@npm:0.51.0"
dependencies:
"@actions/artifact": ^2.2.1
"@actions/cache": ^3.3.0
@@ -1091,7 +1091,7 @@ __metadata:
semver: ^7.6.3
tar-stream: ^3.1.7
tmp: ^0.2.3
checksum: dc1b0323f142f96cbac47be327ebdbc9038a8835f32f174e24c3d8113df03ca6fb034be6ffadeab1e1d234ccd6931e09915c96a8732065e35a576e459d3471ff
checksum: 03d25e8896fed69db608aad58995a41f57325c1e26c197040990c671dfbdeddd2483028d24c2d4505c010a87992780ee09d9e1f1141dda5662857050d644a99b
languageName: node
linkType: hard
@@ -3159,7 +3159,7 @@ __metadata:
resolution: "docker-buildx-bake@workspace:."
dependencies:
"@actions/core": ^1.11.1
"@docker/actions-toolkit": ^0.50.0
"@docker/actions-toolkit": ^0.51.0
"@types/node": ^20.12.12
"@typescript-eslint/eslint-plugin": ^7.9.0
"@typescript-eslint/parser": ^7.9.0