Skip to content

Commit 325faa4

Browse files
committed
fix: use large-linux-arm here going forward
1 parent 34497ce commit 325faa4

File tree

3 files changed

+38
-28
lines changed

3 files changed

+38
-28
lines changed

.github/workflows/ami-release-nix-single.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,13 @@ jobs:
4040
run: |
4141
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
4242
43-
- uses: DeterminateSystems/nix-installer-action@main
43+
- name: Install nix
44+
uses: cachix/install-nix-action@v27
45+
with:
46+
install_url: https://releases.nixos.org/nix/nix-2.29.1/install
47+
extra_nix_config: |
48+
substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com
49+
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
4450
4551
- name: Set PostgreSQL version environment variable
4652
run: echo "POSTGRES_MAJOR_VERSION=${{ github.event.inputs.postgres_version }}" >> $GITHUB_ENV
@@ -58,17 +64,17 @@ jobs:
5864
POSTGRES_MAJOR_VERSION: ${{ env.POSTGRES_MAJOR_VERSION }}
5965
run: |
6066
GIT_SHA=${{ steps.get_sha.outputs.sha }}
61-
sudo nix run github:supabase/postgres/${GIT_SHA}#packer -- init amazon-arm64-nix.pkr.hcl
62-
sudo 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
67+
nix run github:supabase/postgres/${GIT_SHA}#packer -- init amazon-arm64-nix.pkr.hcl
68+
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
6369
6470
- name: Build AMI stage 2
6571
env:
6672
POSTGRES_MAJOR_VERSION: ${{ env.POSTGRES_MAJOR_VERSION }}
6773
run: |
6874
GIT_SHA=${{ steps.get_sha.outputs.sha }}
69-
sudo nix run github:supabase/postgres/${GIT_SHA}#packer -- init stage2-nix-psql.pkr.hcl
75+
nix run github:supabase/postgres/${GIT_SHA}#packer -- init stage2-nix-psql.pkr.hcl
7076
POSTGRES_MAJOR_VERSION=${{ env.POSTGRES_MAJOR_VERSION }}
71-
sudo 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
77+
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
7278
7379
- name: Grab release version
7480
id: process_release_version

.github/workflows/ami-release-nix.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ jobs:
2424
- name: Checkout Repo
2525
uses: supabase/postgres/.github/actions/shared-checkout@HEAD
2626

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=
2834
2935
- name: Set PostgreSQL versions
3036
id: set-versions
@@ -52,7 +58,14 @@ jobs:
5258
aws-region: "us-east-1"
5359
output-credentials: true
5460
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=
5669
5770
- name: Run checks if triggered manually
5871
if: ${{ github.event_name == 'workflow_dispatch' }}
@@ -79,18 +92,18 @@ jobs:
7992
POSTGRES_MAJOR_VERSION: ${{ env.POSTGRES_MAJOR_VERSION }}
8093
run: |
8194
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
8396
# 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
8598
8699
- name: Build AMI stage 2
87100
env:
88101
POSTGRES_MAJOR_VERSION: ${{ env.POSTGRES_MAJOR_VERSION }}
89102
run: |
90103
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
92105
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
94107
95108
- name: Grab release version
96109
id: process_release_version

.github/workflows/testinfra-ami-build.yml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
matrix:
3939
postgres_version: ${{ fromJson(needs.prepare.outputs.postgres_versions) }}
4040
include:
41-
- runner: arm-runner
41+
- runner: large-linux-arm
4242
arch: arm64
4343
ubuntu_release: noble
4444
ubuntu_version: 24.04
@@ -54,20 +54,13 @@ jobs:
5454
- name: Checkout Repo
5555
uses: supabase/postgres/.github/actions/shared-checkout@HEAD
5656

57-
- name: Remove existing DeterminateSystems Nix installation
58-
run: |
59-
# Use the built-in DeterminateSystems uninstaller
60-
if [ -f /nix/nix-installer ]; then
61-
echo "Found DeterminateSystems nix-installer, using built-in uninstaller"
62-
sudo /nix/nix-installer uninstall --no-confirm || true
63-
else
64-
echo "No DeterminateSystems installer found to uninstall"
65-
fi
66-
67-
# Verify removal
68-
echo "Verifying nix removal..."
69-
which nix || echo "nix command no longer available"
70-
ls -la /nix 2>/dev/null || echo "/nix directory removed"
57+
- name: Configure AWS credentials
58+
uses: aws-actions/configure-aws-credentials@v4
59+
with:
60+
role-to-assume: ${{ secrets.DEV_AWS_ROLE }}
61+
aws-region: "us-east-1"
62+
output-credentials: true
63+
role-duration-seconds: 7200
7164

7265
- name: Install nix
7366
uses: cachix/install-nix-action@v27
@@ -77,8 +70,6 @@ jobs:
7770
substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com
7871
trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
7972
80-
- name: Fix nix permissions
81-
run: sudo chown -R $USER /nix/var/nix/profiles/per-user
8273
8374
- id: args
8475
uses: mikefarah/yq@master

0 commit comments

Comments
 (0)