-
Notifications
You must be signed in to change notification settings - Fork 7
93 lines (79 loc) · 2.55 KB
/
ci.yml
File metadata and controls
93 lines (79 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: debug-adapter-registry
on:
pull_request:
paths:
- '.github/workflows/ci.yml'
- 'registry/**'
- 'schemas/**'
- 'templates/**'
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
tests:
if: |
${{ github.event_name == 'pull_request' || github.event_name == 'release' }}
timeout-minutes: 15
runs-on: ubuntu-latest
name: 'Check schemas of registry and templates'
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Lint registry and templates
run: |
npm ci
npm run lint
- name: Check registry schema
uses: GrantBirki/json-yaml-validate@v4.0.0
with:
base_dir: registry
json_schema: schemas/debug-adapters.schema.json
yaml_as_json: true
ajv_strict_mode: false
use_gitignore: false
- name: Check templates schemas
uses: GrantBirki/json-yaml-validate@v4.0.0
with:
base_dir: templates
json_schema: schemas/templates.schema.json
ajv_strict_mode: false
use_gitignore: false
release:
if: ${{ github.event_name == 'release' }}
needs: [ tests ]
timeout-minutes: 15
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: ZIP files
run: zip -r debug-adapter-registry.zip registry schemas templates
- name: TAR files
run: tar -czf debug-adapter-registry.tar.gz registry schemas templates
- name: Attach files to release assets
id: release_assets
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: debug-adapter-registry.*
tag: ${{ github.ref }}
overwrite: true
file_glob: true