-
Notifications
You must be signed in to change notification settings - Fork 28
56 lines (48 loc) · 1.73 KB
/
docker-release.yml
File metadata and controls
56 lines (48 loc) · 1.73 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
on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
name: Release docker image
jobs:
docker:
name: Build docker image
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'GreptimeTeam' }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Login to Dockerhub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to AliCloud Container Registry
uses: docker/login-action@v2
with:
registry: greptime-registry.cn-hangzhou.cr.aliyuncs.com
username: ${{ secrets.ALICLOUD_USERNAME }}
password: ${{ secrets.ALICLOUD_PASSWORD }}
- name: Configure tag # If the release tag is v0.1.0, then the image version tag will be 0.1.0.
shell: bash
run: |
commitShortSHA=`echo ${{ github.sha }} | cut -c1-8`
IMAGE_TAG=$commitShortSHA
echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: ./docker/Dockerfile
push: true
#platforms: linux/amd64,linux/arm64
platforms: linux/amd64
tags: |
greptime/greptimedb-dashboard:latest
greptime/greptimedb-dashboard:${{ env.IMAGE_TAG }}
greptime-registry.cn-hangzhou.cr.aliyuncs.com/greptime/greptimedb-dashboard:latest
greptime-registry.cn-hangzhou.cr.aliyuncs.com/greptime/greptimedb-dashboard:${{ env.IMAGE_TAG }}