Skip to content

Commit e33f31f

Browse files
Merge pull request #12 from depot/update
Fix parsing of set input
2 parents 6cb9697 + 00614c5 commit e33f31f

File tree

5 files changed

+46
-33
lines changed

5 files changed

+46
-33
lines changed

dist/index.js

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
"scripts": {
44
"build": "node build.cjs",
55
"fmt": "prettier --write .",
6-
"fmt:check": "prettier --check ."
6+
"fmt:check": "prettier --check .",
7+
"type-check": "tsc --noEmit"
78
},
89
"dependencies": {
910
"@actions/core": "^1.10.0",
1011
"@actions/exec": "^1.1.1",
1112
"@actions/github": "^5.1.1",
1213
"@actions/http-client": "^2.1.0",
1314
"@actions/io": "^1.1.3",
14-
"@docker/actions-toolkit": "^0.1.0",
15+
"@docker/actions-toolkit": "^0.2.0",
1516
"csv-parse": "^5.3.6",
1617
"execa": "^7.1.1"
1718
},

pnpm-lock.yaml

Lines changed: 12 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/context.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as core from '@actions/core'
22
import * as github from '@actions/github'
3+
import {Util} from '@docker/actions-toolkit/lib/util'
34
import * as csv from 'csv-parse/sync'
45
import * as fs from 'fs'
56
import * as os from 'os'
@@ -34,7 +35,7 @@ export function getInputs(): Inputs {
3435
provenance: getProvenanceInput(),
3536
push: core.getBooleanInput('push'),
3637
sbom: core.getInput('sbom'),
37-
set: parseCSV(core.getInput('set')),
38+
set: Util.getInputList('set', {ignoreComma: true, quote: false}),
3839
source: core.getInput('source'),
3940
project: core.getInput('project'),
4041
token: core.getInput('token') || process.env.DEPOT_TOKEN,

src/depot.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,14 @@ export async function bake(inputs: Inputs) {
6969
]
7070

7171
const toolkit = new Toolkit()
72-
const bakedef = await toolkit.bake.parseDefinitions([...inputs.files, inputs.source], inputs.targets, inputs.workdir)
72+
const bakedef = await toolkit.bake.parseDefinitions(
73+
[...inputs.files, inputs.source],
74+
inputs.targets,
75+
inputs.set,
76+
inputs.load,
77+
inputs.push,
78+
inputs.workdir,
79+
)
7380
if (inputs.provenance) {
7481
bakeArgs.push('--provenance', inputs.provenance)
7582
} else if (!Bake.hasDockerExporter(bakedef, inputs.load)) {

0 commit comments

Comments
 (0)