generated from idrinth-api-bench/project-defaults
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (52 loc) · 1.72 KB
/
global.docker.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
43
44
45
46
47
48
49
50
51
52
name: Docker
on:
push:
branches:
- the-one
paths:
- 'containers/*/Dockerfile'
- '.github/workflows/docker.yml'
pull_request:
branches:
- the-one
paths:
- 'containers/*/Dockerfile'
- '.github/workflows/docker.yml'
jobs:
builder:
name: Builder
runs-on: ubuntu-latest
timeout-minutes: 360
steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: git fetch --tags
- name: Cache Docker images.
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-${{ hashFiles('containers/api-bench-build/Dockerfile') }}
- run: docker build --build-arg="BUILD_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)" -t "idrinth/api-bench-build:$(git describe --tags `git rev-list --tags --max-count=1`)" --build-arg="BUILD_TIME=now" containers/api-bench-build
build:
needs:
- builder
strategy:
matrix:
folder:
- 'api-bench-gitlab-runner'
- 'api-bench'
- 'api-bench-gitea-action'
- 'api-bench-history-website'
- 'api-bench-history-microservice'
name: Build ${{ matrix.folder }}
runs-on: ubuntu-latest
timeout-minutes: 360
steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: git fetch --tags
- name: Cache Docker images.
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-${{ hashFiles('containers/api-bench-build/Dockerfile') }}
read-only: true
- run: docker build --build-arg="BUILD_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)" --build-arg="BUILD_TIME=now" containers/${{ matrix.folder }}