-
-
Notifications
You must be signed in to change notification settings - Fork 679
29 lines (23 loc) · 1.03 KB
/
docker-push.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
name: Build and Push to Alibaba Cloud Registry
on:
push:
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Alibaba Cloud Docker Registry
run: docker login --username=${{ secrets.ALI_DOCKER_USERNAME }} registry.cn-beijing.aliyuncs.com --password=${{ secrets.ALI_DOCKER_PASSWORD }}
- name: Build and push Docker image
run: |
docker build -t registry.cn-beijing.aliyuncs.com/bieber/teable:${GITHUB_SHA} -f dockers/teable/Dockerfile .
docker push registry.cn-beijing.aliyuncs.com/bieber/teable:${GITHUB_SHA}
# Tag the built image with 'latest' label
docker tag registry.cn-beijing.aliyuncs.com/bieber/teable:${GITHUB_SHA} registry.cn-beijing.aliyuncs.com/bieber/teable:latest
# Push the 'latest' tagged image
docker push registry.cn-beijing.aliyuncs.com/bieber/teable:latest