-
-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (31 loc) · 888 Bytes
/
docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Docker
on:
workflow_call:
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x86_64, aarch64]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v8
- name: Setup Nix cache
uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Build Docker image
id: image
run: |
nix build -L .#container-${{ matrix.arch }}
[ ! -L result ] && exit 1
echo "path=$(realpath result)" >> "$GITHUB_OUTPUT"
- name: Upload image
uses: actions/upload-artifact@v3
with:
name: container-${{ matrix.arch }}
path: ${{ steps.image.outputs.path }}
if-no-files-found: error
retention-days: 1