Skip to content

feat: refine agora crop model and pac ontology #25

feat: refine agora crop model and pac ontology

feat: refine agora crop model and pac ontology #25

Workflow file for this run

name: Publish ontologies
on:
push:
branches:
- main
- master
workflow_dispatch:
permissions:
contents: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set ontology version
run: echo "ONTOLOGY_VERSION=1.0.${GITHUB_RUN_NUMBER}" >> "$GITHUB_ENV"
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install renderer dependencies
run: npm install --prefix rdf2html
- name: Update source ontologies
run: |
npm run --prefix rdf2html version
npm run --prefix rdf2html build
- name: Commit ontology version
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add agora/agora.ttl agora/agora.html fsm/fsm.ttl fsm/fsm.html pac/pac.ttl pac/pac.html msg/msg.ttl msg/msg.html users/users.ttl users/users.html
if ! git diff --cached --quiet; then
git commit -m "chore: update ontology version ${ONTOLOGY_VERSION} [skip ci]"
git push
fi
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ vars.DOCKERHUB_REPOSITORY }}
tags: |
type=ref,event=branch
type=sha,prefix=sha-
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and publish
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
ONTOLOGY_VERSION=${{ env.ONTOLOGY_VERSION }}
- name: Trigger Portainer redeploy
env:
PORTAINER_WEBHOOK_URL: ${{ secrets.PORTAINER_WEBHOOK_URL }}
run: |
if [ -n "$PORTAINER_WEBHOOK_URL" ]; then
curl -fsSL -X POST "$PORTAINER_WEBHOOK_URL"
fi