-
Notifications
You must be signed in to change notification settings - Fork 50
62 lines (53 loc) · 1.49 KB
/
test_build_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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: "Test build Docker image"
env:
DEFAULT_PYTHON_VERSION: "3.10"
FORCE_COLOR: "1" # Make tools pretty.
on:
pull_request:
push:
branches:
- main
# ensuring only one instance is running at a given time
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-docker-image:
name: "Build docker images"
runs-on: ubuntu-latest
strategy:
matrix:
docker-image:
- conda-store
- conda-store-server
steps:
- name: "Checkout Repository 🛎"
uses: actions/checkout@v4
- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v3
- name: "Lint Dockerfiles 🔍"
uses: jbergstroem/hadolint-gh-action@v1
with:
dockerfile: ${{ matrix.docker-image }}/Dockerfile
output_format: tty
error_level: 0
- name: "Docker Meta"
id: meta
uses: docker/metadata-action@v5
with:
images: |
quansight/${{ matrix.docker-image }}
tags: |
type=sha
- name: "Build Docker images"
uses: docker/build-push-action@v5
with:
context: "${{ matrix.docker-image }}"
file: "${{ matrix.docker-image }}/Dockerfile"
tags: |
${{ steps.meta.outputs.tags }}
target: "dev"
push: false
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max