forked from Computer_Society/open-goverance
ci: split the original push workflow into 4 seperate ones
This commit is contained in:
parent
93e127ad4e
commit
9e2a58cc7e
8 changed files with 90 additions and 53 deletions
|
@ -1,50 +0,0 @@
|
|||
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
|
29
.forgejo/workflows/push_budgets.yaml
Normal file
29
.forgejo/workflows/push_budgets.yaml
Normal file
|
@ -0,0 +1,29 @@
|
|||
name: On_Push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths:
|
||||
- Committee/**/Budget/*
|
||||
# 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
|
||||
permissions:
|
||||
# needs this to create tags and releases
|
||||
contents: write
|
||||
steps:
|
||||
# has to checkout first in order to be able to use the action
|
||||
- uses: https://code.forgejo.org/actions/checkout@v4
|
||||
- name: Use local action
|
||||
uses: ./.forgejo/actions/build-release-pdf
|
||||
with:
|
||||
repository: ${{ gitea.repository }}
|
||||
ref_name: ${{ gitea.ref_name }}
|
||||
token: ${{ secrets.API_TOKEN_FORGEJO }}
|
||||
script: "budget"
|
29
.forgejo/workflows/push_events.yaml
Normal file
29
.forgejo/workflows/push_events.yaml
Normal file
|
@ -0,0 +1,29 @@
|
|||
name: On_Push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths:
|
||||
- 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
|
||||
permissions:
|
||||
# needs this to create tags and releases
|
||||
contents: write
|
||||
steps:
|
||||
# has to checkout first in order to be able to use the action
|
||||
- uses: https://code.forgejo.org/actions/checkout@v4
|
||||
- name: Use local action
|
||||
uses: ./.forgejo/actions/build-release-pdf
|
||||
with:
|
||||
repository: ${{ gitea.repository }}
|
||||
ref_name: ${{ gitea.ref_name }}
|
||||
token: ${{ secrets.API_TOKEN_FORGEJO }}
|
||||
script: "events"
|
29
.forgejo/workflows/push_handovers.yaml
Normal file
29
.forgejo/workflows/push_handovers.yaml
Normal file
|
@ -0,0 +1,29 @@
|
|||
name: On_Push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths:
|
||||
- Committee/**/Handovers/*
|
||||
# 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
|
||||
permissions:
|
||||
# needs this to create tags and releases
|
||||
contents: write
|
||||
steps:
|
||||
# has to checkout first in order to be able to use the action
|
||||
- uses: https://code.forgejo.org/actions/checkout@v4
|
||||
- name: Use local action
|
||||
uses: ./.forgejo/actions/build-release-pdf
|
||||
with:
|
||||
repository: ${{ gitea.repository }}
|
||||
ref_name: ${{ gitea.ref_name }}
|
||||
token: ${{ secrets.API_TOKEN_FORGEJO }}
|
||||
script: "handovers"
|
|
@ -5,7 +5,6 @@ on:
|
|||
branches:
|
||||
- 'main'
|
||||
paths:
|
||||
- .forgejo/**/*
|
||||
- Minutes/**/*
|
||||
# so we can manually build the artifacts
|
||||
workflow_dispatch:
|
||||
|
|
|
@ -109,3 +109,4 @@ Brendan Golden.
|
|||
[5]: https://renew.skynet.ie/
|
||||
[6]: https://renew.skynet.ie/recovery/
|
||||
[7]: https://2016.skynet.ie/history.html
|
||||
|
||||
|
|
Loading…
Reference in a new issue