Skip to content

Commit 584e6a5

Browse files
author
DJTBOT
committed
Build aarch64 docker image via single-user Nix
1 parent 0397a84 commit 584e6a5

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

.github/workflows/docker-image.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,29 @@ permissions:
1010
contents: read
1111
packages: write
1212

13+
env:
14+
NIX_CONFIG: |
15+
experimental-features = nix-command flakes
16+
extra-platforms = aarch64-linux
17+
1318
jobs:
1419
build-and-push:
15-
runs-on: ubuntu-24.04-arm64
20+
runs-on: ubuntu-latest
1621
steps:
1722
- name: Checkout
1823
uses: actions/checkout@v4
1924

20-
- name: Install Nix
25+
- name: Install Nix (single-user)
2126
shell: bash
2227
run: |
2328
set -euo pipefail
24-
curl -fsSL https://install.determinate.systems/nix | sh -s -- install --no-confirm
25-
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
29+
curl -fsSL https://install.determinate.systems/nix | sh -s -- install --no-confirm --no-daemon
30+
if [ -f "$HOME/.nix-profile/etc/profile.d/nix.sh" ]; then
31+
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
32+
else
33+
echo "Nix profile not found" >&2
34+
exit 1
35+
fi
2636
nix --version
2737
2838
- name: Resolve upstream version
@@ -39,8 +49,8 @@ jobs:
3949
shell: bash
4050
run: |
4151
set -euo pipefail
42-
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
43-
nix build .#clawdbot-docker
52+
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
53+
nix build .#packages.aarch64-linux.clawdbot-docker
4454
4555
- name: Load image
4656
shell: bash

0 commit comments

Comments
 (0)