summaryrefslogtreecommitdiff
path: root/.github/workflows/deploy.yaml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/deploy.yaml')
-rw-r--r--.github/workflows/deploy.yaml25
1 files changed, 10 insertions, 15 deletions
diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml
index 0311f3f..be6f850 100644
--- a/.github/workflows/deploy.yaml
+++ b/.github/workflows/deploy.yaml
@@ -1,22 +1,21 @@
name: Deploy infrastructure
on:
- push:
- branches: [main]
+ check_suite:
+ types: [completed]
workflow_dispatch:
jobs:
- ci:
- name: CI
- uses: ./.github/workflows/ci.yaml
- secrets: inherit
-
nixos:
- needs: ci
-
name: Deploy NixOS systems
runs-on: ubuntu-latest
+ # https://github.com/sellout/bash-strict-mode/commit/9bf1d65c2f786a9887facfcb81e06d8b8b5f4667
+ if: github.event.check_suite.app.name == 'Garnix CI'
+ && github.event.check_suite.conclusion == 'success'
+ && github.event.check_suite.latest_check_runs_count >= 12
+ && github.event.check_suite.head_branch == 'main'
+
concurrency:
group: deploy
cancel-in-progress: true
@@ -27,12 +26,8 @@ jobs:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v9
- - name: Setup Attic cache
- uses: ryanccn/attic-action@v0
- with:
- endpoint: https://cache.mydadleft.me
- cache: flake
- token: ${{ secrets.ATTIC_TOKEN }}
+ - name: Setup local Nix cache
+ uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Connect to Tailscale
uses: tailscale/github-action@v2