tangled
alpha
login
or
join now
futur.blue
/
pegasus
56
fork
atom
objective categorical abstract machine language personal data server
56
fork
atom
overview
issues
2
pulls
pipelines
Build amd64 and arm64 images on same-arch hosts
futur.blue
2 months ago
28d5cf23
604d88cd
verified
This commit was signed with the committer's
known signature
.
futur.blue
SSH Key Fingerprint:
SHA256:QHGqHWNpqYyw9bt8KmPuJIyeZX9SZewBZ0PR1COtKQ0=
+43
-14
1 changed file
expand all
collapse all
unified
split
.github
workflows
build.yml
+43
-14
.github/workflows/build.yml
···
6
6
- main
7
7
8
8
jobs:
9
9
-
docker:
9
9
+
build-amd64:
10
10
runs-on: ubuntu-latest
11
11
permissions:
12
12
packages: write
13
13
steps:
14
14
-
- name: Log in to GitHub Container Registry
15
15
-
uses: docker/login-action@v3
14
14
+
- uses: docker/login-action@v3
16
15
with:
17
16
registry: ghcr.io
18
17
username: ${{ github.actor }}
19
18
password: ${{ secrets.GITHUB_TOKEN }}
20
19
21
21
-
- name: Set up Docker Buildx
22
22
-
uses: docker/setup-buildx-action@v3
20
20
+
- uses: docker/setup-buildx-action@v3
23
21
24
22
- uses: actions/checkout@v6
23
23
+
24
24
+
- name: Build and push
25
25
+
uses: docker/build-push-action@v6
25
26
with:
26
26
-
sparse-checkout: |
27
27
-
.git
27
27
+
push: true
28
28
+
tags: ghcr.io/futurgh/pegasus:${{ github.sha }}-amd64
29
29
+
build-args: GIT_REV=${{ github.sha }}
30
30
+
31
31
+
build-arm64:
32
32
+
runs-on: ubuntu-24.04-arm
33
33
+
permissions:
34
34
+
packages: write
35
35
+
steps:
36
36
+
- uses: docker/login-action@v3
37
37
+
with:
38
38
+
registry: ghcr.io
39
39
+
username: ${{ github.actor }}
40
40
+
password: ${{ secrets.GITHUB_TOKEN }}
41
41
+
42
42
+
- uses: docker/setup-buildx-action@v3
28
43
29
29
-
- name: Set short git commit SHA
30
30
-
run: |
31
31
-
short_sha=$(git rev-parse --short ${{ github.sha }})
32
32
-
echo "COMMIT_SHORT_SHA=$short_sha" >> $GITHUB_ENV
44
44
+
- uses: actions/checkout@v6
33
45
34
46
- name: Build and push
35
47
uses: docker/build-push-action@v6
36
48
with:
37
37
-
platforms: linux/amd64,linux/arm64
38
49
push: true
39
39
-
tags: ghcr.io/futurgh/pegasus:latest
40
40
-
build-args: GIT_REV=$GIT_REV
50
50
+
tags: ghcr.io/futurgh/pegasus:${{ github.sha }}-arm64
51
51
+
build-args: GIT_REV=${{ github.sha }}
52
52
+
53
53
+
merge:
54
54
+
runs-on: ubuntu-latest
55
55
+
needs: [build-amd64, build-arm64]
56
56
+
permissions:
57
57
+
packages: write
58
58
+
steps:
59
59
+
- uses: docker/login-action@v3
60
60
+
with:
61
61
+
registry: ghcr.io
62
62
+
username: ${{ github.actor }}
63
63
+
password: ${{ secrets.GITHUB_TOKEN }}
64
64
+
65
65
+
- name: Create multi-arch manifest
66
66
+
run: |
67
67
+
docker buildx imagetools create -t ghcr.io/futurgh/pegasus:latest \
68
68
+
ghcr.io/futurgh/pegasus:${{ github.sha }}-amd64 \
69
69
+
ghcr.io/futurgh/pegasus:${{ github.sha }}-arm64