-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1013 Bytes
/
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
on:
push:
branches: [ master ]
concurrency:
group: build
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
registry:
- registry.cn-hangzhou.aliyuncs.com
- registry.us-west-1.aliyuncs.com
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
registry: ${{ matrix.registry }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
tags: |
${{ matrix.registry }}/xingrz/env-hifi4:latest
${{ matrix.registry }}/xingrz/env-hifi4:2021.7
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}