Skip to content

Merge pull request #1 from artur-borys/jenkins #12

Merge pull request #1 from artur-borys/jenkins

Merge pull request #1 from artur-borys/jenkins #12

# This is a basic workflow to help you get started with Actions
name: build-and-release
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
push:
branches:
- master
env:
REGISTRY_USER: aborys
IMAGE_REGISTRY: docker.io
REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
strategy:
matrix:
flavor: [rocky, rocky-minimal]
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Build ${{ matrix.flavor }} image
id: build-image-rocky
uses: redhat-actions/buildah-build@v2
with:
image: podman-builder
tags: latest-${{ matrix.flavor }} ${{ github.sha }}-${{ matrix.flavor }} ${{ startsWith(github.ref, 'refs/tags') && format('{0}-{1}', github.ref_name, matrix.flavor) || '' }}
containerfiles: |
./Containerfile.${{ matrix.flavor }}
platforms: linux/amd64, linux/arm64
- name: Push ${{ matrix.flavor }} image to docker.io
uses: redhat-actions/push-to-registry@v2
with:
image: podman-builder
tags: latest-${{ matrix.flavor }} ${{ github.sha }}-${{ matrix.flavor }} ${{ startsWith(github.ref, 'refs/tags') && format('{0}-{1}', github.ref_name, matrix.flavor) || '' }}
registry: aborys
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}