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
- main
7
8
jobs:
9
-
docker:
10
runs-on: ubuntu-latest
11
permissions:
12
packages: write
13
steps:
14
-
- name: Log in to GitHub Container Registry
15
-
uses: docker/login-action@v3
16
with:
17
registry: ghcr.io
18
username: ${{ github.actor }}
19
password: ${{ secrets.GITHUB_TOKEN }}
20
21
-
- name: Set up Docker Buildx
22
-
uses: docker/setup-buildx-action@v3
23
24
- uses: actions/checkout@v6
0
0
0
25
with:
26
-
sparse-checkout: |
27
-
.git
0
0
0
0
0
0
0
0
0
0
0
0
0
0
28
29
-
- name: Set short git commit SHA
30
-
run: |
31
-
short_sha=$(git rev-parse --short ${{ github.sha }})
32
-
echo "COMMIT_SHORT_SHA=$short_sha" >> $GITHUB_ENV
33
34
- name: Build and push
35
uses: docker/build-push-action@v6
36
with:
37
-
platforms: linux/amd64,linux/arm64
38
push: true
39
-
tags: ghcr.io/futurgh/pegasus:latest
40
-
build-args: GIT_REV=$GIT_REV
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
6
- main
7
8
jobs:
9
+
build-amd64:
10
runs-on: ubuntu-latest
11
permissions:
12
packages: write
13
steps:
14
+
- uses: docker/login-action@v3
0
15
with:
16
registry: ghcr.io
17
username: ${{ github.actor }}
18
password: ${{ secrets.GITHUB_TOKEN }}
19
20
+
- uses: docker/setup-buildx-action@v3
0
21
22
- uses: actions/checkout@v6
23
+
24
+
- name: Build and push
25
+
uses: docker/build-push-action@v6
26
with:
27
+
push: true
28
+
tags: ghcr.io/futurgh/pegasus:${{ github.sha }}-amd64
29
+
build-args: GIT_REV=${{ github.sha }}
30
+
31
+
build-arm64:
32
+
runs-on: ubuntu-24.04-arm
33
+
permissions:
34
+
packages: write
35
+
steps:
36
+
- uses: docker/login-action@v3
37
+
with:
38
+
registry: ghcr.io
39
+
username: ${{ github.actor }}
40
+
password: ${{ secrets.GITHUB_TOKEN }}
41
+
42
+
- uses: docker/setup-buildx-action@v3
43
44
+
- uses: actions/checkout@v6
0
0
0
45
46
- name: Build and push
47
uses: docker/build-push-action@v6
48
with:
0
49
push: true
50
+
tags: ghcr.io/futurgh/pegasus:${{ github.sha }}-arm64
51
+
build-args: GIT_REV=${{ github.sha }}
52
+
53
+
merge:
54
+
runs-on: ubuntu-latest
55
+
needs: [build-amd64, build-arm64]
56
+
permissions:
57
+
packages: write
58
+
steps:
59
+
- uses: docker/login-action@v3
60
+
with:
61
+
registry: ghcr.io
62
+
username: ${{ github.actor }}
63
+
password: ${{ secrets.GITHUB_TOKEN }}
64
+
65
+
- name: Create multi-arch manifest
66
+
run: |
67
+
docker buildx imagetools create -t ghcr.io/futurgh/pegasus:latest \
68
+
ghcr.io/futurgh/pegasus:${{ github.sha }}-amd64 \
69
+
ghcr.io/futurgh/pegasus:${{ github.sha }}-arm64