forked from Skynet/wiki
ci: added new actions
This commit is contained in:
parent
7f6c671a18
commit
66d797f440
3 changed files with 38 additions and 6 deletions
10
.forgejo/workflows/build.yaml
Normal file
10
.forgejo/workflows/build.yaml
Normal 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
|
|
@ -1,6 +0,0 @@
|
|||
on: [push]
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo All Good
|
28
.forgejo/workflows/deploy_to_skynet.yaml
Normal file
28
.forgejo/workflows/deploy_to_skynet.yaml
Normal 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"}'
|
||||
|
Loading…
Reference in a new issue