Skip to content

bump: flake inputs #477

bump: flake inputs

bump: flake inputs #477

Workflow file for this run

name: Deploy
on:
pull_request:
types:
- closed
workflow_dispatch:
jobs:
deploy:
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.NIXOS_DEPLOY_KEY }}
name: id_ed25519
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
config: ${{ secrets.SSH_CONFIG }}
- name: Install nix
uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
extra-substituters = https://cache.garnix.io
extra-trusted-public-keys = cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=
- name: Use nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Deploy remote hosts
run: make remote REBUILD="nix run nixpkgs#nixos-rebuild --"
- name: Notify success
if: success()
run: |
curl -u :${{ secrets.NTFY_TOKEN }} \
-H "Title: Deploy NixOS" \
-H "Tags: rocket,green_circle" \
-H "Click: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
-H "Icon: https://avatars.githubusercontent.com/u/487568?s=200&v=4" \
-d "Deploy success." \
https://ntfy.snakepi.xyz/dev
- name: Notify failure
if: failure()
run: |
curl -u :${{ secrets.NTFY_TOKEN }} \
-H "Title: Deploy NixOS" \
-H "Priority: high" \
-H "Tags: rocket,red_circle" \
-H "Click: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
-H "Icon: https://avatars.githubusercontent.com/u/487568?s=200&v=4" \
-d "Deploy failure." \
https://ntfy.snakepi.xyz/dev