Skip to content

Compile dbld-images #2307

Compile dbld-images

Compile dbld-images #2307

Workflow file for this run

name: Compile dbld-images
on:
pull_request:
paths:
- 'dbld/**'
- 'packaging/rhel/**'
- 'packaging/debian/**'
- '.github/workflows/dbld-images.yml'
push:
paths:
- 'dbld/**'
- 'packaging/rhel/**'
- 'packaging/debian/**'
- '.github/workflows/dbld-images.yml'
schedule:
- cron: '00 22 * * *'
workflow_dispatch:
inputs:
testing_image_upload:
description: Should we upload the images into GitHub Packages? (true/false)
required: false
default: "false"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
image:
- almalinux-8
- fedora-39
- debian-bullseye
- debian-bookworm
- debian-sid
- debian-testing
- ubuntu-focal
- ubuntu-jammy
- ubuntu-noble
- ubuntu-lunar
- ubuntu-mantic
- devshell
- kira
- tarball
fail-fast: false
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Set container registry
run: |
CONTAINER_REGISTRY="ghcr.io/${{ github.repository_owner }}"
CONTAINER_REGISTRY="$(echo "$CONTAINER_REGISTRY" | tr '[:upper:]' '[:lower:]')"
. .github/workflows/gh-tools.sh
gh_export CONTAINER_REGISTRY
- name: Build the images
run: dbld/rules image-${{ matrix.image }}
- name: Should we upload the images?
run: |
if [ "${{ github.event.inputs.testing_image_upload }}" = "true" ] || \
( \
[ "${{ github.repository_owner }}" = "syslog-ng" ] && \
[ "${{ github.ref }}" = "refs/heads/master" ] && \
[[ "${{ github.event_name }}" =~ ^(push|workflow_dispatch|schedule)$ ]] \
)
then
UPLOAD_IMAGES_INTERNAL="true"
else
UPLOAD_IMAGES_INTERNAL="false"
fi
. .github/workflows/gh-tools.sh
gh_export UPLOAD_IMAGES_INTERNAL
- name: Log in to the Container registry
if: env.UPLOAD_IMAGES_INTERNAL == 'true'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push the images
if: env.UPLOAD_IMAGES_INTERNAL == 'true'
run: |
dbld/rules push-image-${{ matrix.image }}