Skip to content

Commit 7220d7b

Browse files
committed
chore: introduce a darwin builder just for the nix build
1 parent a003a6e commit 7220d7b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/nix-build.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
arch: amd64
2323
- runner: arm-runner
2424
arch: arm64
25+
- runner: macos-latest
26+
arch: arm64
2527
runs-on: ${{ matrix.runner }}
2628

2729
steps:
@@ -45,17 +47,32 @@ jobs:
4547
env:
4648
NIX_SIGN_SECRET_KEY: ${{ secrets.NIX_SIGN_SECRET_KEY }}
4749
- name: Log in to Docker Hub
50+
if: matrix.runner != 'macos-latest'
4851
uses: docker/login-action@v2
4952
with:
5053
username: ${{ secrets.DOCKER_USERNAME }}
5154
password: ${{ secrets.DOCKER_PASSWORD }}
5255
- name: Build psql bundle with nix
56+
if: matrix.runner != 'macos-latest'
5357
run: docker build -t base_nix -f docker/nix/Dockerfile .
5458
- name: Run build psql bundle
59+
if: matrix.runner != 'macos-latest'
5560
run: |
5661
docker run -e AWS_ACCESS_KEY_ID=${{ env.AWS_ACCESS_KEY_ID }} \
5762
-e AWS_SECRET_ACCESS_KEY=${{ env.AWS_SECRET_ACCESS_KEY }} \
5863
-e AWS_SESSION_TOKEN=${{ env.AWS_SESSION_TOKEN }} \
5964
base_nix bash -c "./workspace/docker/nix/build_nix.sh"
65+
- name: Build psql bundle on macos
66+
if: matrix.runner == 'macos-latest'
67+
run: |
68+
# Replace this with your actual build script
69+
cp ./workspace/docker/nix/build_nix.sh ./build_nix.sh
70+
sed -i 's/cd workspace//g' ./build_nix.sh
71+
./build_nix.sh
72+
env:
73+
AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }}
74+
AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }}
75+
AWS_SESSION_TOKEN: ${{ env.AWS_SESSION_TOKEN }}
76+
6077
name: build psql bundle on ${{ matrix.arch }}
6178

0 commit comments

Comments
 (0)