ci: test using our own action
This commit is contained in:
parent
66d797f440
commit
78d8fb5f54
2 changed files with 21 additions and 30 deletions
|
@ -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'
|
|
@ -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"}'
|
||||
|
Loading…
Reference in a new issue