Skip to content

Update push.yaml

Update push.yaml #7

Workflow file for this run

name: Push & build images on each commit
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
environment: registry
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: amd64,arm64
- name: Log in
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push images
run: |
- name: Build and push images
run: |
ls -lah
for dir in containerfiles/*/; do
repo_name=$(basename "$dir")
if [[ "$repo_name" == bootc-* ]]; then
echo "Skipping $repo_name: Ignored by pattern"
continue
fi
if [ -d "$dir" ]; then
if [ -f "$dir/Dockerfile" ]; then
echo "Building and pushing $repo_name"
docker buildx build --platform linux/amd64,linux/arm64 \
-t quay.io/${{ secrets.QUAY_USERNAME }}/${repo_name}:latest \
--push "$dir"
else
echo "Skipping $repo_name: No Dockerfile found"
fi
else
echo "Skipping $dir: Not a directory"
fi
done