Changed to execute a scan job when the build job is finished. #36
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |