-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild-graalvm-container-image.yaml
More file actions
170 lines (151 loc) · 5.28 KB
/
build-graalvm-container-image.yaml
File metadata and controls
170 lines (151 loc) · 5.28 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
name: Build Container Image (GraalVM)
run-name: Build Arcane.Stream.MicrosoftSynapseLink Image (GraalVM) for GHCR from ${{ github.ref }} by @${{ github.actor }}
on: workflow_dispatch
env:
REGISTRY: ghcr.io
IMAGE_NAME: sneaksanddata/arcane-stream-microsoft-synapse-link-graalvm # need lowercase here
jobs:
build_amd64_image:
name: Build Docker Image (amd64)
runs-on:
labels: ubuntu-latest-16-cores-public
outputs:
image_digest: ${{ steps.image_build.outputs.digest }}
env:
TOKEN: '${{ secrets.MAVEN_PUBLISH_TOKEN }}'
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Log in to the Container registry
uses: docker/login-action@v3.4.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get project version
uses: SneaksAndData/github-actions/generate_version@v0.1.11
id: version
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}},value=${{steps.version.outputs.version}}
flavor:
latest=false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.7.1
with:
use: true
platforms: linux/amd64
- name: Build and push Docker image
id: image_build
uses: docker/build-push-action@v6.9.0
with:
context: .
file: .container/Dockerfile.graalvm
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
outputs: type=image,"name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}",push-by-digest=true,name-canonical=true,push=true
build-args: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
USERLIB=x86_64-linux-gnu
build_arm64_image:
name: Build Docker Image (arm64)
runs-on:
labels: ubuntu-latest-16-cores-arm-public
outputs:
image_digest: ${{ steps.image_build.outputs.digest }}
env:
TOKEN: '${{ secrets.MAVEN_PUBLISH_TOKEN }}'
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Log in to the Container registry
uses: docker/login-action@v3.4.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get project version
uses: SneaksAndData/github-actions/generate_version@v0.1.11
id: version
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}},value=${{steps.version.outputs.version}}
flavor:
latest=false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.7.1
with:
use: true
platforms: linux/arm64
- name: Build and push Docker image
id: image_build
uses: docker/build-push-action@v6.9.0
with:
context: .
file: .container/Dockerfile.graalvm
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/arm64
outputs: type=image,"name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}",push-by-digest=true,name-canonical=true,push=true
build-args: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
USERLIB=aarch64-linux-gnu
publish_manifest:
name: Publish multiarch manifest
needs: [build_amd64_image, build_arm64_image]
runs-on: ubuntu-latest
env:
TOKEN: '${{ secrets.MAVEN_PUBLISH_TOKEN }}'
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Log in to the Container registry
uses: docker/login-action@v3.4.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get project version
uses: SneaksAndData/github-actions/generate_version@v0.1.11
id: version
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}},value=${{steps.version.outputs.version}}
flavor:
latest=false
- name: Create multiarch image
uses: int128/docker-manifest-create-action@v2
with:
tags: ${{ steps.meta.outputs.tags }}
sources: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ needs.build_amd64_image.outputs.image_digest }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ needs.build_arm64_image.outputs.image_digest }}