File tree Expand file tree Collapse file tree 1 file changed +67
-0
lines changed Expand file tree Collapse file tree 1 file changed +67
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Spec"
2+ on :
3+ push :
4+ branches :
5+ - main
6+ pull_request :
7+ workflow_dispatch :
8+
9+ jobs :
10+ build-openapi :
11+ name : " 🐍 Build OpenAPI definitions for matrix.org"
12+ runs-on : ubuntu-latest
13+ container : " python:3.9"
14+ steps :
15+ - name : " 📥 Source checkout"
16+ uses : actions/checkout@v2
17+ - name : " 📦 Asset creation"
18+ run : |
19+ python3 -m venv env && . env/bin/activate
20+ pip install -r scripts/requirements.txt
21+ scripts/generate-matrix-org-assets
22+ - name : " 📤 Artifact upload"
23+ uses : actions/upload-artifact@v2
24+ with :
25+ name : openapi-artifact
26+ path : assets.tar.gz
27+
28+ build-spec :
29+ name : " 📖 Build the spec"
30+ runs-on : ubuntu-latest
31+ steps :
32+ - name : " ➕ Setup Node"
33+ uses : actions/setup-node@v2
34+ with :
35+ node-version : ' 14'
36+ - name : " ➕ Setup Hugo"
37+ uses : peaceiris/actions-hugo@c03b5dbed22245418539b65eb9a3b1d5fdd9a0a6
38+ with :
39+ hugo-version : ' 0.85.0'
40+ extended : true
41+ - name : " 📥 Source checkout"
42+ uses : actions/checkout@v2
43+ with :
44+ submodules : ' recursive'
45+ - name : " ⚙️ npm"
46+ run : |
47+ npm i
48+ npm run get-proposals
49+ - name : " ⚙️ hugo"
50+ run : hugo --baseURL "/unstable" -d "spec"
51+ - name : " 📦 Tarball creation"
52+ run : tar -czf spec.tar.gz spec
53+ - name : " 📤 Artifact upload"
54+ uses : actions/upload-artifact@v2
55+ with :
56+ name : spec-artifact
57+ path : spec.tar.gz
58+
59+ rebuild-matrixdotorg :
60+ name : " 👷 Rebuild matrix.org"
61+ needs : build-openapi
62+ runs-on : ubuntu-latest
63+ if : ${{ false && github.event_name == 'push' && github.ref == 'refs/head/main' }}
64+ steps :
65+ - name : " 🪄 Triggering rebuild of matrix.org"
66+ run : |
67+ curl -XPOST -u "${{secrets.TRIGGER_MATRIXORG_REBUILD_TOKEN}}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/${{ github.repository_owner }}/matrix.org/actions/workflows/build-matrix.org.yml/dispatches --data '{"ref": "${{ github.ref }}" }'
You can’t perform that action at this time.
0 commit comments