diff --git a/.github/subaction-list-targets.png b/.github/subaction-list-targets.png index b0a0086..f6e82db 100644 Binary files a/.github/subaction-list-targets.png and b/.github/subaction-list-targets.png differ diff --git a/subaction/list-targets/README.md b/subaction/list-targets/README.md index bdc02b1..7b42f22 100644 --- a/subaction/list-targets/README.md +++ b/subaction/list-targets/README.md @@ -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 | diff --git a/subaction/list-targets/action.yml b/subaction/list-targets/action.yml index 9613b09..e4ef2d3 100644 --- a/subaction/list-targets/action.yml +++ b/subaction/list-targets/action.yml @@ -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 = {};