52 lines
1.5 KiB
YAML
52 lines
1.5 KiB
YAML
name: On_Push
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
paths:
|
|
- .forgejo/**/*
|
|
- Committee/**/Handovers/*
|
|
- Minutes/**/*
|
|
- 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, minutes, budget, events ]
|
|
script: [ budget ]
|
|
permissions:
|
|
# needs this to create tags and releases
|
|
contents: write
|
|
steps:
|
|
# get the repo first
|
|
- uses: https://code.forgejo.org/actions/checkout@v4
|
|
# actual script to run the build process
|
|
- run: nix run .#${{ matrix.script }}
|
|
# upload the files
|
|
# - uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
|
# with:
|
|
# name: ${{ matrix.script }}
|
|
# path: pdf_${{ matrix.script }}/
|
|
- uses: https://forgejo.skynet.ie/Skynet/actions-forgejo-release@v1
|
|
with:
|
|
token: ${{ secrets.API_TOKEN_FORGEJO }}
|
|
direction: upload
|
|
release-dir: "pdf_${{ matrix.script }}"
|
|
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
|
|
verbose: true
|
|
- if: always()
|
|
run: sleep 60m
|
|
shell: bash
|