-
Notifications
You must be signed in to change notification settings - Fork 7
56 lines (53 loc) · 2.08 KB
/
build-and-publish-dev-image.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
56
name: build and publish dev images
on:
# trigger testing manually
workflow_dispatch:
jobs:
build-and-publish-dev-image:
runs-on: ubuntu-latest
strategy:
matrix:
base_image: [ anolis8, rocky8, rocky9, ubuntu20.04, ubuntu22.04, ubuntu24.04 ]
steps:
# Checkout source code
- uses: actions/checkout@v4
- name: Get commit SHA
id: sha
run: |
sha=${{ github.sha }}
echo "sha=${sha:0:8}" >> $GITHUB_OUTPUT
# Environment preparation
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to the ghcr
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Alibaba Cloud ACR
uses: docker/login-action@v3
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALIBABA_CLOUD_ACR_USERNAME }}
password: ${{ secrets.ALIBABA_CLOUD_ACR_PASSWORD }}
- name: Build and push all development images
uses: docker/build-push-action@v5
with:
push: true
file: Dockerfile-devel-${{ matrix.base_image }}
tags: |
polardb/polardb_pg_devel:${{ matrix.base_image }}
polardb/polardb_pg_devel:${{ matrix.base_image }}-${{ steps.sha.outputs.sha }}
ghcr.io/apsaradb/polardb_pg_devel:${{ matrix.base_image }}
ghcr.io/apsaradb/polardb_pg_devel:${{ matrix.base_image }}-${{ steps.sha.outputs.sha }}
registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_devel:${{ matrix.base_image }}
registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_devel:${{ matrix.base_image }}-${{ steps.sha.outputs.sha }}
platforms: linux/amd64, linux/arm64