Skip to content

Commit e91be54

Browse files
authored
Merge pull request #75 from joshuanianji/cleanup
ci: skip deprecated features
2 parents b0a183b + 37cdf91 commit e91be54

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

.github/workflows/test.yaml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,31 @@ jobs:
2929
with:
3030
script: |
3131
import os
32+
import json
33+
3234
for folder in os.listdir('src'):
33-
print(f"{folder}:")
34-
print(f" - '**/{folder}/**'")
35-
print(f" - '.github/workflows/test.yaml'")
35+
config = os.path.join('src', folder, 'devcontainer-feature.json')
36+
if not os.path.isfile(config):
37+
continue
38+
39+
with open(config, 'r') as f:
40+
data = json.load(f)
41+
if data.get('deprecated') is True:
42+
print(f"Skipping deprecated feature: {folder}")
43+
continue
44+
45+
with open('.github/tmp-paths-filter.yml', 'a') as f:
46+
f.write(f"{folder}:\n")
47+
f.write(f" - '**/{folder}/**'\n")
48+
f.write(f" - '.github/workflows/test.yaml'\n")
49+
50+
- name: Print paths filter
51+
run: cat .github/tmp-paths-filter.yml
3652

37-
- name: Paths Filter
38-
uses: dorny/paths-filter@v3
53+
- uses: dorny/paths-filter@v3
3954
id: filter
4055
with:
41-
filters: |
42-
${{ steps.generate-changes.outputs.stdout }}
56+
filters: .github/tmp-paths-filter.yml
4357

4458
test-autogenerated:
4559
needs: detect-changes

0 commit comments

Comments
 (0)