add deploy-rs and workflow

This commit is contained in:
uku 2024-01-19 00:45:43 +01:00
parent ab0244aeb3
commit a7076e8074
Signed by: uku
GPG key ID: 7D01D7B105E77166
5 changed files with 148 additions and 24 deletions

View file

@ -1,4 +1,4 @@
name: build overlay
name: nix ci
on:
push:
@ -10,7 +10,7 @@ jobs:
outputs:
matrix: ${{ steps.eval.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v9
@ -18,7 +18,7 @@ jobs:
- name: evaluate packages
id: eval
run: echo "matrix=$(nix eval --json .#ghaMatrix)" >> "$GITHUB_OUTPUT"
build:
needs: eval
strategy:
@ -38,4 +38,29 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: build
run: nix build -L --accept-flake-config .#${{ matrix.pkg }}
run: nix build -L --accept-flake-config .#${{ matrix.pkg }}
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v9
- name: connect to tailscale
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ secrets.TS_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:gha
- name: copy known_hosts
run: |
set -eux
[ ! -d ~/.ssh ] && mkdir -p ~/.ssh
cp .known_hosts ~/.ssh/known_hosts
- name: deploy
run: nix run --inputs-from . 'nixpkgs#deploy-rs' -- -s