Skip to content

Build the Apache2 container #562

Build the Apache2 container

Build the Apache2 container #562

---
name: Build the Apache2 container
on:
push:
paths:
- "apache2/**"
- ".github/workflows/build-apache2.yaml"
schedule:
- cron: '0 7 * * *'
workflow_dispatch:
jobs:
build-push-apache2:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: ./apache2
platforms: linux/amd64,linux/arm64
# only push the latest tag on the main branch
push: "${{ github.ref == 'refs/heads/main' }}"
tags: |
ghcr.io/openconext/openconext-basecontainers/apache2:latest
ghcr.io/openconext/openconext-basecontainers/apache2:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha