24
24
- name : Checkout Repo
25
25
uses : supabase/postgres/.github/actions/shared-checkout@HEAD
26
26
27
- - uses : DeterminateSystems/nix-installer-action@main
27
+ - name : Install nix
28
+ uses : cachix/install-nix-action@v27
29
+ with :
30
+ install_url : https://releases.nixos.org/nix/nix-2.29.1/install
31
+ extra_nix_config : |
32
+ substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com
33
+ trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
28
34
29
35
- name : Set PostgreSQL versions
30
36
id : set-versions
52
58
aws-region : " us-east-1"
53
59
output-credentials : true
54
60
role-duration-seconds : 7200
55
- - uses : DeterminateSystems/nix-installer-action@main
61
+
62
+ - name : Install nix
63
+ uses : cachix/install-nix-action@v27
64
+ with :
65
+ install_url : https://releases.nixos.org/nix/nix-2.29.1/install
66
+ extra_nix_config : |
67
+ substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com
68
+ trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
56
69
57
70
- name : Run checks if triggered manually
58
71
if : ${{ github.event_name == 'workflow_dispatch' }}
@@ -79,18 +92,18 @@ jobs:
79
92
POSTGRES_MAJOR_VERSION : ${{ env.POSTGRES_MAJOR_VERSION }}
80
93
run : |
81
94
GIT_SHA=${{github.sha}}
82
- sudo -E nix run github:supabase/postgres/${GIT_SHA}#packer -- init amazon-arm64-nix.pkr.hcl
95
+ nix run github:supabase/postgres/${GIT_SHA}#packer -- init amazon-arm64-nix.pkr.hcl
83
96
# why is postgresql_major defined here instead of where the _three_ other postgresql_* variables are defined?
84
- sudo -E nix run github:supabase/postgres/${GIT_SHA}#packer -- build -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${GITHUB_RUN_ID}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" -var "ansible_arguments=-e postgresql_major=${POSTGRES_MAJOR_VERSION}" amazon-arm64-nix.pkr.hcl
97
+ nix run github:supabase/postgres/${GIT_SHA}#packer -- build -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${GITHUB_RUN_ID}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" -var "ansible_arguments=-e postgresql_major=${POSTGRES_MAJOR_VERSION}" amazon-arm64-nix.pkr.hcl
85
98
86
99
- name : Build AMI stage 2
87
100
env :
88
101
POSTGRES_MAJOR_VERSION : ${{ env.POSTGRES_MAJOR_VERSION }}
89
102
run : |
90
103
GIT_SHA=${{github.sha}}
91
- sudo -E nix run github:supabase/postgres/${GIT_SHA}#packer -- init stage2-nix-psql.pkr.hcl
104
+ nix run github:supabase/postgres/${GIT_SHA}#packer -- init stage2-nix-psql.pkr.hcl
92
105
POSTGRES_MAJOR_VERSION=${{ env.POSTGRES_MAJOR_VERSION }}
93
- sudo -E nix run github:supabase/postgres/${GIT_SHA}#packer -- build -var "git_sha=${GIT_SHA}" -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${GITHUB_RUN_ID}" -var "postgres_major_version=${POSTGRES_MAJOR_VERSION}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" stage2-nix-psql.pkr.hcl
106
+ nix run github:supabase/postgres/${GIT_SHA}#packer -- build -var "git_sha=${GIT_SHA}" -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${GITHUB_RUN_ID}" -var "postgres_major_version=${POSTGRES_MAJOR_VERSION}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" stage2-nix-psql.pkr.hcl
94
107
95
108
- name : Grab release version
96
109
id : process_release_version
0 commit comments