Skip to content

Changed to execute a scan job when the build job is finished. #39

Changed to execute a scan job when the build job is finished.

Changed to execute a scan job when the build job is finished. #39

Workflow file for this run

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