Skip to content

Build and push disk images #2

Build and push disk images

Build and push disk images #2

name: "Debugging"
on:
pull_request:
schedule:
- cron: '0 */12 * * *'
env:
REGISTRY: quay.io
REPOSITORY: flightctl
jobs:
build-and-push-containers:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
strategy:
fail-fast: false
matrix:
flavor: [centos, fedora, rhel]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and push disk images
run: |
sudo apt install -y qemu-user qemu-user-static podman
mkdir bootc-images
cp .github/workflow-scripts/buildah-build-and-push-manifest.sh bootc-images
URL=${{ env.REGISTRY }}/${{ env.REPOSITORY }}/flightctl-agent-${{ matrix.flavor }}
for ARCH in amd64 arm64; do
for FORMAT in qcow2 raw; do
echo ".github/workflow-scripts/bib-build.sh $ARCH $FORMAT $URL:bootstrap" > cmds
done
done
cat cmds | xargs -I CMD --max-procs=4 bash -c CMD
podman run \
--rm \
-v $(pwd)/bootc-images:/bootc-images \
-e "BUILDAH_USERNAME=${{ secrets.QUAY_FLIGHTCTL_INFRA_ROBOT_USERNAME }}" \
-e "BUILDAH_PASSWORD=${{ secrets.QUAY_FLIGHTCTL_INFRA_ROBOT_PASSWORD }}" \
-e "BUILDAH_URL=$URL:bootc" \
quay.io/buildah/stable:v1.36.0 \
/bootc-images/buildah-build-and-push-manifest.sh