-
Notifications
You must be signed in to change notification settings - Fork 134
42 lines (42 loc) · 1.3 KB
/
test-docker-image.yaml
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: Test Docker Image
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
test-build-docker-image:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: Checkout code
uses: actions/checkout@v3
- # Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Read VERSION file
id: getversion
run: echo "::set-output name=version::$(grep -v '^\#' ./release-version)"
- name: Build
uses: docker/build-push-action@v3
with:
file: ./dockerfiles/centos7.Dockerfile
context: .
# Currently github action runner only supports linux/amd64, it take a lot of time to build multi-arch image.
# So we only build amd64 image for now.
platforms: linux/amd64
push: false
tags: pingcap/tidb-dashboard:${{ steps.getversion.outputs.version }}
no-cache: false
pull: false
cache-from: type=gha
cache-to: type=gha,mode=max