-
Notifications
You must be signed in to change notification settings - Fork 168
125 lines (110 loc) · 4.17 KB
/
docker_image_linux.yml
File metadata and controls
125 lines (110 loc) · 4.17 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
name: Docker Release
on:
release:
types: [published]
jobs:
build:
if: github.repository == 'FirelyTeam/spark'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
# Set up QEMU for cross-platform builds (ARM64 emulation on AMD64 runner)
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
# Set up Docker Buildx for multi-platform builds
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to DockerHub Registry
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Get the version
id: vars
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
# Build and push multi-arch Spark R4 image
- name: Docker meta (Spark R4)
id: meta_spark_r4
uses: docker/metadata-action@v5
with:
images: |
${{ secrets.DOCKERHUB_ORGANIZATION }}/spark
${{ secrets.DOCKERHUB_ORGANIZATION_2 }}/spark
tags: |
type=raw,value=${{ steps.vars.outputs.tag }}-r4
type=raw,value=r4-latest,enable=${{ github.event.release.prerelease == false }}
- name: Build and push Spark R4 Docker image
uses: docker/build-push-action@v7
with:
context: .
file: .docker/linux/Spark.R4.Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta_spark_r4.outputs.tags }}
# Cache layers
cache-from: type=gha
cache-to: type=gha,mode=max
# Build and push multi-arch Mongo R4 image
- name: Docker meta (Mongo R4)
id: meta_mongo_r4
uses: docker/metadata-action@v5
with:
images: |
${{ secrets.DOCKERHUB_ORGANIZATION }}/mongo
${{ secrets.DOCKERHUB_ORGANIZATION_2 }}/mongo
tags: |
type=raw,value=${{ steps.vars.outputs.tag }}-r4
type=raw,value=r4-latest,enable=${{ github.event.release.prerelease == false }}
- name: Build and push Mongo R4 Docker image
uses: docker/build-push-action@v7
with:
context: .
file: .docker/linux/Mongo.R4.Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta_mongo_r4.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
# Build and push multi-arch Spark STU3 image
- name: Docker meta (Spark STU3)
id: meta_spark_stu3
uses: docker/metadata-action@v5
with:
images: |
${{ secrets.DOCKERHUB_ORGANIZATION }}/spark
${{ secrets.DOCKERHUB_ORGANIZATION_2 }}/spark
tags: |
type=raw,value=${{ steps.vars.outputs.tag }}-stu3
type=raw,value=stu3-latest,enable=${{ github.event.release.prerelease == false }}
- name: Build and push Spark STU3 Docker image
uses: docker/build-push-action@v7
with:
context: .
file: .docker/linux/Spark.STU3.Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta_spark_stu3.outputs.tags }}
# Cache layers
cache-from: type=gha
cache-to: type=gha,mode=max
# Build and push multi-arch Mongo STU3 image
- name: Docker meta (Mongo STU3)
id: meta_mongo_stu3
uses: docker/metadata-action@v5
with:
images: |
${{ secrets.DOCKERHUB_ORGANIZATION }}/mongo
${{ secrets.DOCKERHUB_ORGANIZATION_2 }}/mongo
tags: |
type=raw,value=${{ steps.vars.outputs.tag }}-stu3
type=raw,value=stu3-latest,enable=${{ github.event.release.prerelease == false }}
- name: Build and push Mongo STU3 Docker image
uses: docker/build-push-action@v7
with:
context: .
file: .docker/linux/Mongo.STU3.Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta_mongo_stu3.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max