2024-10-24 13:53:11 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: build-${{matrix.tag}}
|
|
|
|
runs-on: docker
|
|
|
|
container: node:22-bullseye
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
tag:
|
|
|
|
- openjdk-11-maven-3.8.6
|
2024-10-24 14:22:25 +00:00
|
|
|
- python-3.11
|
|
|
|
- python-3.13
|
2024-10-24 13:53:11 +00:00
|
|
|
steps:
|
2024-10-24 14:20:34 +00:00
|
|
|
- name: Clone git repo
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: List modified files
|
|
|
|
uses: tj-actions/changed-files@v45
|
2024-10-24 13:53:11 +00:00
|
|
|
with:
|
2024-10-24 14:20:34 +00:00
|
|
|
files: |
|
|
|
|
${{matrix.tag}}/**
|
|
|
|
id: changed
|
|
|
|
|
|
|
|
- name: Install Buildah
|
|
|
|
run: apt update; apt install -y buildah
|
2024-10-24 14:32:35 +00:00
|
|
|
if: >-
|
|
|
|
github.event_name == 'workflow_dispatch'
|
|
|
|
|| steps.changed.outputs.any_changed == 'true'
|
2024-10-24 14:20:34 +00:00
|
|
|
|
|
|
|
- name: Build OCI image
|
|
|
|
run: make ${{matrix.tag}}
|
2024-10-24 14:32:35 +00:00
|
|
|
if: >-
|
|
|
|
github.event_name == 'workflow_dispatch'
|
|
|
|
|| steps.changed.outputs.any_changed == 'true'
|
2024-10-24 13:53:11 +00:00
|
|
|
|
2024-10-24 14:20:34 +00:00
|
|
|
- name: Push image to OCI registry
|
2024-10-24 14:26:50 +00:00
|
|
|
run: make push-${{matrix.tag}}
|
2024-10-24 14:20:34 +00:00
|
|
|
if: >-
|
2024-10-24 14:32:35 +00:00
|
|
|
github.ref == 'refs/heads/master' &&
|
|
|
|
(github.event_name == 'workflow_dispatch' ||
|
|
|
|
(steps.changed.outputs.any_changed == 'true' && github.event_name == 'push'))
|
2024-10-24 13:53:11 +00:00
|
|
|
env:
|
|
|
|
REGISTRY_PASSWORD: ${secrets.REGISTRY_PASSWORD}
|