ci: test using our own action
All checks were successful
Build / build (push) Successful in 7s
Build / deploy (push) Successful in 8s

This commit is contained in:
silver 2024-08-08 14:44:32 +01:00
parent 66d797f440
commit 78d8fb5f54
2 changed files with 21 additions and 30 deletions

View file

@ -1,10 +1,29 @@
name: Build
# Build it locally
on: [push]
on:
push:
branches:
- 'main'
paths:
- flake.*
- src/**/*
- .forgejo/**/*
jobs:
build:
runs-on: nix
steps:
# get the repo first
- uses: actions/checkout@v4
- name: "Build the Wiki"
run: nix build --verbose
deploy:
runs-on: docker
needs: [ build ]
steps:
- name: "Deploy to Skynet"
uses: https://forgejo.skynet.ie/Skynet/actions-deploy-to-skynet@v1
with:
input: 'skynet_website_renew'

View file

@ -1,28 +0,0 @@
# 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"}'