Skip to content

Commit 7540d5c

Browse files
committed
remove list-targets subaction
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent 5be5f02 commit 7540d5c

5 files changed

Lines changed: 3 additions & 211 deletions

File tree

.github/subaction-list-targets.png

-8.08 KB
Binary file not shown.

.github/workflows/ci-subaction.yml

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -25,56 +25,6 @@ on:
2525
- 'test/**'
2626

2727
jobs:
28-
list-targets:
29-
runs-on: ubuntu-latest
30-
strategy:
31-
fail-fast: false
32-
matrix:
33-
include:
34-
-
35-
testdir: group
36-
expected: >
37-
["t1","t2"]
38-
-
39-
testdir: group-matrix
40-
target: validate
41-
expected: >
42-
["lint-default","lint-labs","lint-nydus","lint-proto","lint-yaml","validate-doctoc","validate-vendor"]
43-
-
44-
testdir: multi-files
45-
files: |
46-
docker-bake.json
47-
docker-bake.hcl
48-
expected: >
49-
["v1-tag","v2-tag"]
50-
steps:
51-
-
52-
name: Checkout
53-
uses: actions/checkout@v6
54-
-
55-
name: Matrix gen
56-
id: gen
57-
uses: ./subaction/list-targets
58-
with:
59-
workdir: ./test/${{ matrix.testdir }}
60-
files: ${{ matrix.files }}
61-
target: ${{ matrix.target }}
62-
-
63-
name: Check output
64-
uses: actions/github-script@v8
65-
env:
66-
INPUT_TARGETS: ${{ steps.gen.outputs.targets }}
67-
INPUT_EXPECTED: ${{ matrix.expected }}
68-
with:
69-
script: |
70-
const targets = JSON.stringify(JSON.parse(core.getInput('targets')));
71-
const expected = JSON.stringify(JSON.parse(core.getInput('expected')));
72-
if (targets !== expected) {
73-
throw new Error(`Targets do not match expected values: ${targets} != ${expected}`);
74-
} else {
75-
core.info(`✅`);
76-
}
77-
7828
matrix:
7929
runs-on: ubuntu-latest
8030
strategy:

.github/workflows/validate.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ jobs:
1515
prepare:
1616
runs-on: ubuntu-latest
1717
outputs:
18-
targets: ${{ steps.generate.outputs.targets }}
18+
matrix: ${{ steps.generate.outputs.matrix }}
1919
steps:
2020
-
2121
name: Checkout
2222
uses: actions/checkout@v6
2323
-
2424
name: List targets
2525
id: generate
26-
uses: ./subaction/list-targets
26+
uses: ./subaction/matrix
2727
with:
2828
target: validate
2929

@@ -34,7 +34,7 @@ jobs:
3434
strategy:
3535
fail-fast: false
3636
matrix:
37-
target: ${{ fromJson(needs.prepare.outputs.targets) }}
37+
include: ${{ fromJson(needs.prepare.outputs.matrix) }}
3838
steps:
3939
-
4040
name: Validate

subaction/list-targets/README.md

Lines changed: 0 additions & 86 deletions
This file was deleted.

subaction/list-targets/action.yml

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)