list-targets: deprecation notice

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2025-07-06 10:59:18 +02:00
parent 68cf998b48
commit 1d0c0ffa52
3 changed files with 15 additions and 21 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@@ -1,9 +1,14 @@
> [!WARNING]
> `docker/bake-action/subaction/list-targets` is deprecated and will be removed
> in a future release. Please use [`docker/bake-action/subaction/matrix`](../matrix)
> instead.
## About
This subaction generates a list of Bake targets that can be used in a [GitHub matrix](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix),
so you can distribute your builds across multiple runners.
![Screenshot](../../.github/bake-action.png)
![Screenshot](../../.github/subaction-list-targets.png)
___
@@ -55,9 +60,6 @@ jobs:
matrix:
target: ${{ fromJson(needs.prepare.outputs.targets) }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Validate
uses: docker/bake-action@v6
@@ -79,6 +81,6 @@ jobs:
The following outputs are available
| Name | Type | Description |
|------------|----------|----------------------------|
| `targets` | List/CSV | List of extracted targest |
| Name | Type | Description |
|------------|----------|---------------------------|
| `targets` | List/CSV | List of extracted targets |

View File

@@ -22,18 +22,6 @@ outputs:
runs:
using: composite
steps:
-
name: Install npm dependencies
uses: actions/github-script@v7
env:
INPUT_ACTIONS-TOOLKIT-VERSION: '0.62.1'
with:
script: |
const version = core.getInput('actions-toolkit-version') || 'latest';
const dep = `@docker/actions-toolkit@${version}`;
await core.group(`Installing ${dep}`, async () => {
await exec.exec('npm', ['install', dep]);
});
-
name: Generate
id: generate
@@ -44,10 +32,14 @@ runs:
INPUT_TARGET: ${{ inputs.target }}
with:
script: |
const { Util } = require('@docker/actions-toolkit/lib/util');
core.warning(`docker/bake-action/subaction/list-targets is deprecated and will be removed in a future release. Please use docker/bake-action/subaction/matrix instead.`);
function getInputList(name) {
return core.getInput(name) ? core.getInput(name).split(/[\r?\n,]+/).filter(x => x !== '') : [];
}
const workdir = core.getInput('workdir');
const files = Util.getInputList('files');
const files = getInputList('files');
const target = core.getInput('target');
let def = {};