Build wheels #62
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build JSON schemas | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- "*" | |
jobs: | |
# see https://github.com/ad-m/github-push-action | |
jsonschemas: | |
name: Update JSONSchemas in docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. | |
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install project and dependencies | |
run: | | |
pip install . | |
- name: Create local changes | |
run: | | |
mappyfile schema docs/schemas/mapfile-latest.json | |
mappyfile schema docs/schemas/mapfile-schema-7-6.json --version=7.6 | |
mappyfile schema docs/schemas/mapfile-schema-8-0.json --version=8.0 | |
mappyfile schema docs/schemas/mapfile-schema-8-2.json --version=8.2 | |
- name: Commit files | |
run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" # user id of the Github Actions account/bot | |
git config --local user.name "github-actions[bot]" | |
git commit -a -m "Update schemas" || true # don't fail on empty commits | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |