open-goverance/.forgejo/workflows/push.yaml
Brendan Golden dd6bc96691
Some checks failed
On_Push / pdfs (events) (push) Has been cancelled
On_Push / pdfs (budget) (push) Has been cancelled
On_Push / pdfs (handovers) (push) Has been cancelled
On_Push / pdfs (push) Failing after 0s
ci: test splitting it up into several different workflows
2024-09-14 20:15:55 +01:00

50 lines
No EOL
1.6 KiB
YAML

name: On_Push
on:
push:
branches:
- 'main'
paths:
- .forgejo/**/*
- Committee/**/Handovers/*
- Committee/**/Budget/*
- Events/**/*
# so we can manually build the artifacts
workflow_dispatch:
jobs:
# rust code must be formatted for standardisation
pdfs:
# build it using teh base nixos system, helps with caching
runs-on: nix
strategy:
matrix:
script: [ handovers, budget, events ]
permissions:
# needs this to create tags and releases
contents: write
steps:
# get the repo first
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: https://forgejo.skynet.ie/Skynet/actions/get_lfs@v3
with:
repository: ${{ gitea.repository }}
ref_name: ${{ gitea.ref_name }}
# actual script to run the build process
- run: nix run .#${{ matrix.script }}
# zip the files so they can be released
- run: |
mkdir releases
zip -r releases/${{ matrix.script }}.zip pdf_${{ matrix.script }}
# upload them so they are available at https://forgejo.skynet.ie/Computer_Society/open-goverance/releases/tag/minutes_latest
- uses: https://forgejo.skynet.ie/Skynet/actions-forgejo-release@v1
with:
token: ${{ secrets.API_TOKEN_FORGEJO }}
direction: upload
release-dir: releases
url: https://forgejo.skynet.ie
repo: Computer_Society/open-goverance
title: "PDFs of ${{ matrix.script }}"
tag: "${{ matrix.script }}_latest"
# basically replace an existing release if it exists
override: true