Skip to content

Commit 8a922bd

Browse files
authored
Merge pull request #6 from depot/feat/bake-pull-all
feat: pull all bake targets by default
2 parents 31ccb20 + 9d71251 commit 8a922bd

File tree

5 files changed

+9
-13
lines changed

5 files changed

+9
-13
lines changed

Diff for: README.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
org/repo:tag
2323
```
2424
25-
Pull bake image targets:
25+
Pull all bake image targets:
2626
2727
```yaml
2828
jobs:
@@ -35,9 +35,6 @@ jobs:
3535
- uses: depot/pull-action@v1
3636
with:
3737
build-id: ${{ steps.build.outputs.build-id }}
38-
target: your-target
39-
tags: |
40-
org/repo:tag
4138
```
4239
4340
## Inputs
@@ -47,7 +44,7 @@ jobs:
4744
| `build-id` | string | **yes** | The build ID to pull images for. |
4845
| `platform` | string | no | The image platform to pull (defaults to the current platform). |
4946
| `tags` | list/CSV | no | A list of tags to apply to the pulled image. |
50-
| `target` | string | no | For a bake build specifies the specific target to pull. |
47+
| `targets` | list/CSV | no | Only pull specific bake targets rather than all. |
5148
| `token` | string | no | The API token to use for authentication. This can be overridden by the `DEPOT_TOKEN` environment variable. |
5249

5350
## License

Diff for: action.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ inputs:
2121
description: If set, will populate the `DEPOT_TOKEN` environment variable.
2222
default: ''
2323
required: false
24-
target:
25-
description: Specific bake target to pull.
26-
default: ''
24+
targets:
25+
description: Pull specific bake targets rather than all.
2726
required: false

Diff for: dist/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -30521,7 +30521,7 @@ function getInputs() {
3052130521
buildID: core.getInput("build-id"),
3052230522
platform: core.getInput("platform"),
3052330523
tags: parseCSV(core.getInput("tags")),
30524-
target: core.getInput("target"),
30524+
targets: parseCSV(core.getInput("targets")),
3052530525
token: core.getInput("token") || process.env.DEPOT_TOKEN
3052630526
};
3052730527
}
@@ -32160,7 +32160,7 @@ async function pull(inputs) {
3216032160
const args = [
3216132161
...flag("--platform", inputs.platform),
3216232162
...flag("--tag", inputs.tags),
32163-
...flag("--target", inputs.target)
32163+
...flag("--target", inputs.targets)
3216432164
];
3216532165
let token = inputs.token ?? process.env.DEPOT_TOKEN;
3216632166
const isOSSPullRequest = !token && github.context.eventName === "pull_request" && github.context.payload.repository?.private === false && github.context.payload.pull_request && github.context.payload.pull_request.head?.repo?.full_name !== github.context.payload.repository?.full_name;

Diff for: src/context.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export interface Inputs {
55
buildID: string
66
platform?: string
77
tags: string[]
8-
target?: string
8+
targets: string[]
99
token?: string
1010
}
1111

@@ -14,7 +14,7 @@ export function getInputs(): Inputs {
1414
buildID: core.getInput('build-id'),
1515
platform: core.getInput('platform'),
1616
tags: parseCSV(core.getInput('tags')),
17-
target: core.getInput('target'),
17+
targets: parseCSV(core.getInput('targets')),
1818
token: core.getInput('token') || process.env.DEPOT_TOKEN,
1919
}
2020
}

Diff for: src/depot.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export async function pull(inputs: Inputs) {
4949
const args = [
5050
...flag('--platform', inputs.platform),
5151
...flag('--tag', inputs.tags),
52-
...flag('--target', inputs.target),
52+
...flag('--target', inputs.targets),
5353
]
5454

5555
let token = inputs.token ?? process.env.DEPOT_TOKEN

0 commit comments

Comments
 (0)