ci: added new actions
Some checks failed
Build / build (push) Failing after 0s

This commit is contained in:
silver 2024-08-08 14:13:28 +01:00
parent 7f6c671a18
commit 66d797f440
3 changed files with 38 additions and 6 deletions

View file

@ -0,0 +1,10 @@
name: Build
# Build it locally
on: [push]
jobs:
build:
runs-on: nix
steps:
- name: "Build the Wiki"
run: nix build --verbose

View file

@ -1,6 +0,0 @@
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: echo All Good

View file

@ -0,0 +1,28 @@
# This is to deploy it to our nixos repo
name: Deploy
on:
# for testing
workflow_dispatch:
inputs:
input_to_update:
description: 'Flake input to update'
required: false
type: string
workflow_run:
workflows: [ "Build" ]
types:
- completed
env:
INPUT: skynet_website_renew
jobs:
deploy:
runs-on: nix
steps:
- name: "Deploy to Skynet"
run: |
curl -X 'POST' 'https://forgejo.skynet.ie/api/v1/repos/Skynet/nixos/actions/workflows/update_input.yaml/dispatches?token=${{ secrets.API_TOKEN_FORGEJO }}' -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"inputs": {"input_to_update": "$INPUT"}, "ref": "main"}'