ci: test splitting it up into several different workflows
This commit is contained in:
parent
dfc5075ce6
commit
dd6bc96691
4 changed files with 72 additions and 3 deletions
42
.forgejo/actions/build-release-pdf/action.yml
Normal file
42
.forgejo/actions/build-release-pdf/action.yml
Normal file
|
@ -0,0 +1,42 @@
|
|||
name: 'Build and Release PDF'
|
||||
description: 'Build and release the PDFs in teh Open Governance repo'
|
||||
inputs:
|
||||
repository:
|
||||
description: 'Pass in gitea.repository'
|
||||
required: true
|
||||
ref_name:
|
||||
description: 'Pass in gitea.ref_name'
|
||||
required: true
|
||||
token:
|
||||
description: 'Pass in secrets.API_TOKEN_FORGEJO'
|
||||
required: true
|
||||
script:
|
||||
description: 'The script we want to run'
|
||||
required: true
|
||||
runs:
|
||||
using: "composite"
|
||||
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: ${{ inputs.repository }}
|
||||
ref_name: ${{ inputs.ref_name }}
|
||||
# actual script to run the build process
|
||||
- run: nix run .#${{ inputs.script }}
|
||||
# zip the files so they can be released
|
||||
- run: |
|
||||
mkdir releases
|
||||
zip -r releases/${{ inputs.script }}.zip pdf_${{ inputs.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: ${{ inputs.token }}
|
||||
direction: upload
|
||||
release-dir: releases
|
||||
url: https://forgejo.skynet.ie
|
||||
repo: Computer_Society/open-goverance
|
||||
title: "PDFs of ${{ inputs.script }}"
|
||||
tag: "${{ inputs.script }}_latest"
|
||||
# basically replace an existing release if it exists
|
||||
override: true
|
Loading…
Add table
Add a link
Reference in a new issue