This commit is contained in:
albert 2025-02-02 18:00:55 -08:00
parent e1b04d8b86
commit 36b463a75d
Signed by: albert
GPG key ID: 3895DD267CA11BA9
2 changed files with 11 additions and 28 deletions
.forgejo/workflows
nixos/common/services

View file

@ -22,19 +22,13 @@ jobs:
DEPLOY_SSH_USER: ${{ secrets.SSH_USER }}
DEPLOY_SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
- if: success()
uses: https://git.sysctl.io/actions/gotify-action@master
- uses: https://git.sysctl.io/actions/gotify-action@master
if: always()
with:
gotify_api_base: '${{ secrets.GOTIFY_URL }}'
gotify_app_token: '${{ secrets.GOTIFY_TOKEN }}'
notification_title: '[ ${{ github.repository }}: ${{ github.workflow }} ] NixOS Deployed'
notification_message: 'Deployment completed successfully.'
name: "Send Notification - Success"
- 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.'
name: "Send Notification - Failure"
gotify_api_base: ${{ secrets.GOTIFY_URL }}
gotify_app_token: ${{ secrets.GOTIFY_TOKEN }}
notification_title: |
[${{ github.repository }}] Deployment ${{ job.status }}
notification_message: |
Status: ${{ job.status }}
Commit: ${{ github.sha }}

View file

@ -14,7 +14,7 @@
enable = true;
name = "${hostname}";
labels = [
"nix:host://self-hosted"
"nix"
"${hostname}:host://self-hosted"
"self-hosted:host://self-hosted"
"alpine:docker://alpine:edge"
@ -23,18 +23,7 @@
];
url = "https://git.sysctl.io";
tokenFile = /run/secrets/services/forgejo_token;
hostPackages = with pkgs; [
bash
coreutils
curl
gawk
gitMinimal
gnused
nodejs
wget
nix
git
];
hostPackages = with pkgs; [ nix deploy-rs ];
};
};
}