Skip to content

Commit 9e19c69

Browse files
committed
Fix up deployment action
1 parent 7abf3fb commit 9e19c69

3 files changed

Lines changed: 18 additions & 19 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ on:
1010
required: true
1111
workflow_dispatch:
1212

13-
env:
14-
NIX_BUILDER: ""
13+
defaults:
14+
run:
15+
# Use Nix for all of our build commands.
16+
# Doing this will automatically run everything in our devShell.
17+
shell: nix develop -c bash -e {0}
1518

1619
jobs:
1720
make-all:
@@ -22,12 +25,7 @@ jobs:
2225
with:
2326
ref: ${{ github.ref_name }}
2427

25-
- name: Install Nix packages
26-
uses: diamondburned/cache-install@main
27-
with:
28-
auto-optimise: true
29-
instantiated-files: packages/
30-
nix-install-url: https://releases.nixos.org/nix/nix-2.18.1/install
28+
- uses: nixbuild/nix-quick-install-action@v30
3129

3230
- name: Run all package Makefiles
3331
run: ./scripts/pkg make
@@ -53,14 +51,16 @@ jobs:
5351
# latest commit from.
5452
ref: ${{ github.ref_name }}
5553

56-
- name: Install Nix packages
57-
id: nix-install
58-
uses: diamondburned/cache-install@main
59-
with:
60-
auto-optimise: true
61-
shell-file: shell.nix
62-
instantiated-files: servers/*/default.nix
63-
nix-install-url: https://releases.nixos.org/nix/nix-2.18.1/install
54+
- uses: nixbuild/nix-quick-install-action@v30
55+
- uses: nix-community/cache-nix-action@v6
56+
with: # see https://github.com/nix-community/cache-nix-action#example-steps
57+
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
58+
restore-prefixes-first-match: nix-${{ runner.os }}-
59+
gc-max-store-size-linux: 1G
60+
purge: true
61+
purge-prefixes: nix-${{ runner.os }}-
62+
purge-created: 0
63+
purge-primary-key: never
6464

6565
- name: Decrypt git-crypt secrets
6666
uses: ./.github/actions/git-crypt
@@ -103,10 +103,9 @@ jobs:
103103
if: steps.terraform-plan.outputs.status == 2
104104
run: |-
105105
set -o pipefail
106-
./scripts/with-builder "$NIX_BUILDER" \
107-
terraform apply --auto-approve "/tmp/acm-aws-plan" \
106+
terraform apply --auto-approve "/tmp/acm-aws-plan" \
108107
|& tee /tmp/terraform-apply.log \
109-
|& grep -v 'deployment.null_resource.deploy_nixos (\(local\|remote\)-exec):'
108+
|& grep -v 'deployment.null_resource.deploy (.*-exec):'
110109
111110
- name: Commit changes, if any
112111
id: git-commit

secrets/terraform.tfstate

31 Bytes
Binary file not shown.

secrets/terraform.tfstate.backup

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)