remove list-targets subaction

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2025-12-19 10:36:21 +01:00
parent 5be5f02ff8
commit 7540d5c95e
5 changed files with 3 additions and 211 deletions

View File

@@ -25,56 +25,6 @@ on:
- 'test/**'
jobs:
list-targets:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
-
testdir: group
expected: >
["t1","t2"]
-
testdir: group-matrix
target: validate
expected: >
["lint-default","lint-labs","lint-nydus","lint-proto","lint-yaml","validate-doctoc","validate-vendor"]
-
testdir: multi-files
files: |
docker-bake.json
docker-bake.hcl
expected: >
["v1-tag","v2-tag"]
steps:
-
name: Checkout
uses: actions/checkout@v6
-
name: Matrix gen
id: gen
uses: ./subaction/list-targets
with:
workdir: ./test/${{ matrix.testdir }}
files: ${{ matrix.files }}
target: ${{ matrix.target }}
-
name: Check output
uses: actions/github-script@v8
env:
INPUT_TARGETS: ${{ steps.gen.outputs.targets }}
INPUT_EXPECTED: ${{ matrix.expected }}
with:
script: |
const targets = JSON.stringify(JSON.parse(core.getInput('targets')));
const expected = JSON.stringify(JSON.parse(core.getInput('expected')));
if (targets !== expected) {
throw new Error(`Targets do not match expected values: ${targets} != ${expected}`);
} else {
core.info(`✅`);
}
matrix:
runs-on: ubuntu-latest
strategy:

View File

@@ -15,7 +15,7 @@ jobs:
prepare:
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.generate.outputs.targets }}
matrix: ${{ steps.generate.outputs.matrix }}
steps:
-
name: Checkout
@@ -23,7 +23,7 @@ jobs:
-
name: List targets
id: generate
uses: ./subaction/list-targets
uses: ./subaction/matrix
with:
target: validate
@@ -34,7 +34,7 @@ jobs:
strategy:
fail-fast: false
matrix:
target: ${{ fromJson(needs.prepare.outputs.targets) }}
include: ${{ fromJson(needs.prepare.outputs.matrix) }}
steps:
-
name: Validate