mirror of
https://git.flexiblyrigid.au/actions/bake-action.git
synced 2025-12-06 07:48:05 +08:00
list-targets: deprecation notice
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
BIN
.github/subaction-list-targets.png
vendored
BIN
.github/subaction-list-targets.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 8.1 KiB |
@@ -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.
|
||||
|
||||

|
||||

|
||||
|
||||
___
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -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 = {};
|
||||
|
||||
Reference in New Issue
Block a user