Skip to content

Commit

Permalink
Merge pull request #12 from depot/update
Browse files Browse the repository at this point in the history
Fix parsing of set input
  • Loading branch information
jacobwgillespie authored May 9, 2023
2 parents 6cb9697 + 00614c5 commit e33f31f
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 33 deletions.
42 changes: 21 additions & 21 deletions dist/index.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
"scripts": {
"build": "node build.cjs",
"fmt": "prettier --write .",
"fmt:check": "prettier --check ."
"fmt:check": "prettier --check .",
"type-check": "tsc --noEmit"
},
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1",
"@actions/github": "^5.1.1",
"@actions/http-client": "^2.1.0",
"@actions/io": "^1.1.3",
"@docker/actions-toolkit": "^0.1.0",
"@docker/actions-toolkit": "^0.2.0",
"csv-parse": "^5.3.6",
"execa": "^7.1.1"
},
Expand Down
20 changes: 12 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/context.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as core from '@actions/core'
import * as github from '@actions/github'
import {Util} from '@docker/actions-toolkit/lib/util'
import * as csv from 'csv-parse/sync'
import * as fs from 'fs'
import * as os from 'os'
Expand Down Expand Up @@ -34,7 +35,7 @@ export function getInputs(): Inputs {
provenance: getProvenanceInput(),
push: core.getBooleanInput('push'),
sbom: core.getInput('sbom'),
set: parseCSV(core.getInput('set')),
set: Util.getInputList('set', {ignoreComma: true, quote: false}),
source: core.getInput('source'),
project: core.getInput('project'),
token: core.getInput('token') || process.env.DEPOT_TOKEN,
Expand Down
9 changes: 8 additions & 1 deletion src/depot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,14 @@ export async function bake(inputs: Inputs) {
]

const toolkit = new Toolkit()
const bakedef = await toolkit.bake.parseDefinitions([...inputs.files, inputs.source], inputs.targets, inputs.workdir)
const bakedef = await toolkit.bake.parseDefinitions(
[...inputs.files, inputs.source],
inputs.targets,
inputs.set,
inputs.load,
inputs.push,
inputs.workdir,
)
if (inputs.provenance) {
bakeArgs.push('--provenance', inputs.provenance)
} else if (!Bake.hasDockerExporter(bakedef, inputs.load)) {
Expand Down

0 comments on commit e33f31f

Please sign in to comment.