This repository has been archived by the owner on Dec 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (51 loc) · 1.67 KB
/
build-docker-images.yml
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
name: ci
on:
workflow_dispatch:
push:
branches:
- 'main'
env:
DOCKER_IMAGE_NAME: voltrondata/superset-sqlalchemy-adbc-flight-sql
jobs:
docker:
name: Build Docker images
strategy:
matrix:
include:
- platform: amd64
runner: ubuntu-latest
- platform: arm64
runner: ["self-hosted", "ubuntu-22.04-arm"] # This is self-hosted, change later...
runs-on: ${{ matrix.runner }}
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v4
with:
platforms: linux/${{ matrix.platform }}
push: true
tags: ${{ env.DOCKER_IMAGE_NAME }}:latest-${{ matrix.platform }}
no-cache: true
provenance: false
update-image-manifest:
name: Update DockerHub image manifest to include all built platforms
needs: docker
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Create and push manifest images
uses: Noelware/docker-manifest-action@master # or use a pinned version in the Releases tab
with:
inputs: ${{ env.DOCKER_IMAGE_NAME }}:latest
images: ${{ env.DOCKER_IMAGE_NAME }}:latest-amd64,${{ env.DOCKER_IMAGE_NAME }}:latest-arm64
push: true