diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml index 76a537f5..d70ce195 100644 --- a/.forgejo/workflows/deploy.yml +++ b/.forgejo/workflows/deploy.yml @@ -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 }} diff --git a/nixos/common/services/forgejo-runner.nix b/nixos/common/services/forgejo-runner.nix index 22d5a7d8..7fa423a2 100644 --- a/nixos/common/services/forgejo-runner.nix +++ b/nixos/common/services/forgejo-runner.nix @@ -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 ]; }; }; }