nix/.forgejo/workflows/deploy-rs.yml

66 lines
1.9 KiB
YAML
Raw Normal View History

2023-12-25 03:32:41 +01:00
name: deploy-rs
2023-12-25 03:30:44 +01:00
run-name: ${{ github.actor }} - deploy-rs
on:
push:
branches:
- main
jobs:
2023-12-25 03:32:41 +01:00
deploy-rs:
2023-12-25 03:55:33 +01:00
runs-on: self-hosted
2023-12-25 03:30:44 +01:00
steps:
- name: "Runner: Info"
run: |
echo "============= pwd"
pwd
echo "============= ls -lah"
ls -lah
echo '============= id'
id
echo "============= uname -a"
uname -a
echo "============= hostname"
hostname
echo "============= /etc/os-release"
cat /etc/os-release
echo "============= whoami"
whoami
id
echo "============= cat /etc/resolv.conf"
cat /etc/resolv.conf
- name: "Setup: Headscale"
run: |
2023-12-25 03:32:10 +01:00
echo "tailscale status"
tailscale status
echo "tailscale netcheck"
tailscale netcheck
2023-12-25 03:30:44 +01:00
- uses: actions/checkout@v3
- name: "Directory Structure"
run: |
ls ${{ github.workspace }}/*
- name: "Nix Versions"
run: |
echo "nix --version"
nix --version
echo "nixos-Version"
nixos-version
2023-12-25 03:34:04 +01:00
- if: success()
2023-12-25 03:30:44 +01:00
uses: https://git.sysctl.io/actions/gotify-action@master
with:
gotify_api_base: '${{ secrets.GOTIFY_URL }}'
gotify_app_token: '${{ secrets.GOTIFY_TOKEN }}'
2023-12-25 03:34:04 +01:00
notification_title: '[ ${{ github.repository }}: ${{ github.workflow }} ] NixOS Deployed'
notification_message: 'Deployment completed successfully.'
2023-12-25 03:34:40 +01:00
name: "Send Notification - Success"
2023-12-25 03:34:04 +01:00
- if: failure()
uses: https://git.sysctl.io/actions/gotify-action@master
with:
gotify_api_base: '${{ secrets.GOTIFY_URL }}'
gotify_app_token: '${{ secrets.GOTIFY_TOKEN }}'
notification_title: '[ ${{ github.repository }}: ${{ github.workflow }} ] Deployment Failed'
notification_message: 'Your deployment has failed. Check Forgejo.'
2023-12-25 03:34:40 +01:00
name: "Send Notification - Failure"