-
Notifications
You must be signed in to change notification settings - Fork 113
42 lines (36 loc) · 1 KB
/
docker-build.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
name: docker-build
on:
# schedule:
# - cron: '0 0 1 * * ?'
push:
branches: [ "main" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
env:
REGISTRY_AWS: public.ecr.aws/vanus
USERNAME_AWS: AWS
REGISTRY_TENCENT: linkall.tencentcloudcr.com
jobs:
aws:
runs-on: ubuntu-latest
if: |
startsWith(github.event.release.title, 'v')
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v3
# https://github.com/docker/build-push-action:
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY_AWS }}
username: ${{ env.USERNAME_AWS }}
password: ${{ secrets.AWS_ECR_TOKEN }}
- name: Build and Push
timeout-minutes: 30
run: |
make docker-push IMAGE_TAG=dev