[WIP]: use quay.io qm - kvm #164
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: Execute make qm_dropin targets | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
run_qm_dropin_targets: | |
runs-on: ubuntu-latest | |
container: | |
image: fedora:40 # Use Fedora as the container for this job | |
#options: --privileged # Enable privileged mode for nested containers if necessary (optional) | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install required tools and Podman | |
run: | | |
dnf group install -y "Development Tools" | |
dnf install -y make bzip2 grep sed podman rpm-build selinux-policy-devel selinux-policy container-selinux golang-github-cpuguy83-md2man | |
- name: Get qm_dropin targets | |
id: get_targets | |
run: | | |
# Extract all qm_dropin targets from Makefile | |
targets=$(grep -oE '^qm_dropin_[a-zA-Z0-9_-]+:' Makefile | sed 's/://g') | |
if [ -z "$targets" ]; then | |
echo "No qm_dropin targets found." | |
exit 0 | |
fi | |
# Replace newlines with spaces to create a single-line environment variable | |
targets=$(echo "$targets" | tr '\n' ' ') | |
echo "Found qm_dropin targets: $targets" | |
echo "targets=$targets" >> $GITHUB_ENV | |
- name: Run qm_dropin targets | |
run: | | |
# Execute all qm_dropin targets | |
for target in ${{ env.targets }}; do | |
echo "Running target: $target" | |
make $target || exit 1 | |
done | |
- name: Notify success | |
if: success() | |
run: echo "All qm_dropin targets executed successfully." | |
- name: Notify failure | |
if: failure() | |
run: echo "One or more qm_dropin targets failed." && exit 1 |