@@ -9,6 +9,7 @@ permissions:
9
9
id-token : write
10
10
attestations : write
11
11
contents : write
12
+ packages : write
12
13
13
14
env :
14
15
COLUMNS : 120
31
32
dist/anycastd-*
32
33
env :
33
34
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35
+ build-container-image :
36
+ needs : build-wheels
37
+ runs-on : ubuntu-latest
38
+ env :
39
+ REGISTRY : ghcr.io
40
+ IMAGE_NAME : ${{ github.repository }}
41
+ steps :
42
+ - uses : actions/checkout@v4
43
+
44
+ - uses : docker/setup-qemu-action@v3
45
+
46
+ - uses : docker/setup-buildx-action@v3
47
+
48
+ - name : Container Registry Login
49
+ uses : docker/login-action@v3
50
+ with :
51
+ registry : ${{ env.REGISTRY }}
52
+ username : ${{ github.actor }}
53
+ password : ${{ secrets.GITHUB_TOKEN }}
54
+
55
+ - name : Extract Metadata (tags, labels)
56
+ id : meta
57
+ uses : docker/metadata-action@v5
58
+ with :
59
+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
60
+
61
+ - name : Download Release Wheel
62
+ run : gh release download ${GITHUB_REF_NAME} --pattern '*.whl'
63
+ env :
64
+ GITHUB_TOKEN : ${{ github.token }}
65
+
66
+ - name : Build & Push Image
67
+ id : push
68
+ uses : docker/build-push-action@v6
69
+ with :
70
+ context : .
71
+ push : true
72
+ tags : ${{ steps.meta.outputs.tags }}
73
+ labels : ${{ steps.meta.outputs.labels }}
74
+ platforms : linux/amd64,linux/arm/v7,linux/arm64
75
+
76
+ - name : Attest Build Provenance
77
+ uses : actions/attest-build-provenance@v1
78
+ with :
79
+ subject-name : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
80
+ subject-digest : ${{ steps.push.outputs.digest }}
81
+ push-to-registry : true
0 commit comments