Skip to content

Validate and process Building Block #5

Validate and process Building Block

Validate and process Building Block #5

name: Validate and process Building Block
on:
workflow_dispatch:
#push:
# branches:
# - master
# - main
permissions:
contents: write
pages: write
id-token: write
jobs:
validate-and-process:
uses: opengeospatial/bblocks-postprocess/.github/workflows/validate-and-process.yml@master
with:
skip-pages: true
build:
runs-on: ubuntu-latest
needs: validate-and-process
steps:
- name: Checkout
uses: "actions/checkout@v3"
with:
ref: ${{ github.ref_name }}
- name: Setup Python 3.11
uses: "actions/setup-python@v4"
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install rdflib
pip install pyproj
- name: Fetch PanCadastre
run: git clone https://github.com/openwork-nz/pancadastre
- name: Parse all jsonld in build/tests output
run: |
find build/tests -name '*.jsonld' | while read JSON_FILE; do python pancadastre/pancadastre.py -C "${JSON_FILE}" -j "${JSON_FILE}-geojson.json" -s "${JSON_FILE}-summary.txt" -e "${JSON_FILE}-errors.log"
done
rm -r pancadastre
- name: Git pull before push
run: git pull
# Commit new files back to repository
- name: Add and commit
uses: EndBug/add-and-commit@v9
with:
message: "Generate GeoJSON & summary files."
default_author: github_actions
pages:
uses: opengeospatial/bblocks-postprocess/.github/workflows/validate-and-process.yml@master
needs: build
with:
ref: ${{ github.ref_name }}
skip-build: true