-
Notifications
You must be signed in to change notification settings - Fork 5
42 lines (40 loc) · 1.1 KB
/
build.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: build
on:
pull_request:
env:
go-version: 1.23
jobs:
build:
name: Build images
strategy:
matrix:
ubuntu-version: ["20.04", "22.04", "24.04"]
runs-on: ubuntu-24.04
defaults:
run:
working-directory: ${{ matrix.ubuntu-version }}
steps:
- uses: actions/checkout@v4
- name: Setup golang
uses: actions/setup-go@v5
with:
go-version: ${{ env.go-version }}
- name: Build images
run: |
TAG_MINIMAL=$(cat TAG_MINIMAL)
TAG=$(cat TAG)
echo
echo "building ubuntu-minimal:$TAG_MINIMAL..."
docker build \
-t ghcr.io/cybozu/ubuntu-minimal:$TAG_MINIMAL \
--build-arg TAG_MINIMAL=$TAG_MINIMAL \
ubuntu-minimal
for image in ubuntu ubuntu-dev ubuntu-debug; do
echo
echo "building $image:$TAG..."
docker build \
-t ghcr.io/cybozu/${image}:$TAG \
--build-arg TAG_MINIMAL=$TAG_MINIMAL \
--build-arg TAG=$TAG \
${image}
done