Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Docker Image CI
on:
push:
branches: [main, Pr1]

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please remove Pr1 here?

pull_request:
workflow_dispatch:

permissions:
Expand All @@ -13,10 +14,65 @@ concurrency:
cancel-in-progress: true

jobs:
# ===============================================================

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems wrong to duplicate building code instead of omitting registry push step for pr checks.

# PR check: build all images locally, no registry push
# ===============================================================
pr_check:
if: github.event_name == 'pull_request'
strategy:
max-parallel: 6
matrix:
distro:
- name: "alpine-dev"
tag: latest
file: alpine-dev.Dockerfile
- name: "ubuntu-dev"
tag: 20-gcc14
file: u20.04-gcc14-dev.Dockerfile
- name: "fedora"
tag: 30
file: fedora30-dev.Dockerfile
- name: "fedora"
tag: 30-gcc14
file: fedora30-gcc14-dev.Dockerfile
- name: "ubuntu-dev"
tag: 24
file: u24.04-dev.Dockerfile
- name: "ubuntu-dev"
tag: 24-afl
file: u24.04-afl-dev.Dockerfile
- name: "fedora"
tag: 41
file: fedora41-dev.Dockerfile
image:
- name: ubuntu-24.04
arch: amd64
- name: ubuntu-24.04-arm
arch: arm64

runs-on: ${{ matrix.image.name }}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3

- name: Build
uses: docker/build-push-action@v6
with:
context: .
provenance: false
platforms: linux/${{ matrix.image.arch }}
file: ${{ matrix.distro.file }}
load: true
tags: pr-test:${{ matrix.distro.name }}-${{ matrix.distro.tag }}

- name: Test Docker image
run: docker run --rm "pr-test:${{ matrix.distro.name }}-${{ matrix.distro.tag }}" echo succeeded

# ===============================================================
# Building Dev Image
# ===============================================================
build_dev:
if: github.event_name != 'pull_request'
strategy:
max-parallel: 6
matrix:
Expand Down
Loading