-
Notifications
You must be signed in to change notification settings - Fork 17
76 lines (66 loc) · 2.1 KB
/
Copy pathci.yml
File metadata and controls
76 lines (66 loc) · 2.1 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
name: The Trial of Truth aka CI
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- master
permissions:
contents: read
jobs:
files-changed:
if: github.event.pull_request.draft == false
name: The Watchful Eye (Files Changed)
runs-on: ubuntu-latest
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
outputs:
api_source: ${{ steps.changes.outputs.api_source }}
client_source: ${{ steps.changes.outputs.client_source }}
workflows: ${{ steps.changes.outputs.workflows }}
steps:
- name: The Oracle's Gaze aka Checkout Code
uses: actions/checkout@v4
- name: The Seer's Vision aka Filter Paths
uses: dorny/paths-filter@v3
id: changes
with:
filters: |
api_source:
- 'projects/api/src/**'
- 'projects/api/deno.json'
openapi:
- 'projects/openapi/*'
openapi:
needs: files-changed
name: The Scribe's Chamber (OpenAPI)
runs-on: ubuntu-latest
steps:
- name: Summoning the Ancient Scrolls aka Checkout Code
uses: actions/checkout@v4
- name: The Oracle's Gaze aka Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.3.0
- name: The Sacred Assembly aka Install Dependencies
run: "deno task install"
- name: The Scroll's Scrutiny aka Validate OpenAPI
if: ${{
needs.files-changed.outputs.api_source == 'true' ||
needs.files-changed.outputs.openapi == 'true'
}}
run: deno task openapi:validate
- name: The Sacred Transcription aka Generate OpenAPI
if: github.ref == 'refs/heads/master'
run: deno task openapi:generate
- name: Preserving the Sacred Texts aka Upload Definition
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v4
with:
name: openapi
path: projects/openapi/openapi.json
if-no-files-found: error
retention-days: 30