Cleanups to github actions workflow (#1476)
This commit is contained in:
parent
a21b23dda8
commit
ac8d34bc81
2 changed files with 20 additions and 5 deletions
24
.github/workflows/main.yml
vendored
24
.github/workflows/main.yml
vendored
|
@ -37,13 +37,21 @@ jobs:
|
||||||
check-examples:
|
check-examples:
|
||||||
name: "🔎 Check Event schema examples"
|
name: "🔎 Check Event schema examples"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: uhoreg/matrix-doc-build
|
|
||||||
steps:
|
steps:
|
||||||
- name: "📥 Source checkout"
|
- name: "📥 Source checkout"
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
- name: "➕ Setup Python"
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.9'
|
||||||
|
cache: 'pip'
|
||||||
|
cache-dependency-path: scripts/requirements.txt
|
||||||
|
- name: "➕ Install dependencies"
|
||||||
|
run: |
|
||||||
|
pip install -r scripts/requirements.txt
|
||||||
- name: "🔎 Run validator"
|
- name: "🔎 Run validator"
|
||||||
run: |
|
run: |
|
||||||
/env/bin/python scripts/check-event-schema-examples.py
|
python scripts/check-event-schema-examples.py
|
||||||
|
|
||||||
calculate-baseurl:
|
calculate-baseurl:
|
||||||
name: "⚙️ Calculate baseURL for later jobs"
|
name: "⚙️ Calculate baseURL for later jobs"
|
||||||
|
@ -70,15 +78,21 @@ jobs:
|
||||||
build-openapi:
|
build-openapi:
|
||||||
name: "🐍 Build OpenAPI definitions"
|
name: "🐍 Build OpenAPI definitions"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: "python:3.9"
|
|
||||||
needs: [calculate-baseurl]
|
needs: [calculate-baseurl]
|
||||||
steps:
|
steps:
|
||||||
- name: "📥 Source checkout"
|
- name: "📥 Source checkout"
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
- name: "➕ Setup Python"
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.9'
|
||||||
|
cache: 'pip'
|
||||||
|
cache-dependency-path: scripts/requirements.txt
|
||||||
|
- name: "➕ Install dependencies"
|
||||||
|
run: |
|
||||||
|
pip install -r scripts/requirements.txt
|
||||||
- name: "📦 Asset creation"
|
- name: "📦 Asset creation"
|
||||||
run: |
|
run: |
|
||||||
python3 -m venv env && . env/bin/activate
|
|
||||||
pip install -r scripts/requirements.txt
|
|
||||||
# The output path matches the final deployment path at spec.matrix.org
|
# The output path matches the final deployment path at spec.matrix.org
|
||||||
scripts/dump-swagger.py \
|
scripts/dump-swagger.py \
|
||||||
--base-url "https://spec.matrix.org${{ needs.calculate-baseurl.outputs.baseURL }}" \
|
--base-url "https://spec.matrix.org${{ needs.calculate-baseurl.outputs.baseURL }}" \
|
||||||
|
|
1
changelogs/internal/newsfragments/1476.clarification
Normal file
1
changelogs/internal/newsfragments/1476.clarification
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Minor cleanups to the GitHub Actions workflows
|
Loading…
Add table
Add a link
Reference in a new issue