Rebuild images once a month #14
Workflow file for this run
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: Build dunst CI images | ||
# Run only when merged onto master or once a month in order to get latest | ||
# packages for each distribution. | ||
on: | ||
schedule: | ||
cron: "42 3 15 * *" | ||
push: | ||
branches: [ 'master' ] | ||
workflow_dispatch: | ||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
distro: | ||
- alpine | ||
- archlinux | ||
- debian-bookworm | ||
- debian-bullseye | ||
- debian-buster | ||
- fedora | ||
- misc-doxygen | ||
- ubuntu-focal | ||
- ubuntu-jammy | ||
# We need to push to the registry | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Log in to the Container registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
# Default metadata action step. | ||
# Will add some "org.opencontainers.*"-labels with useful descriptions | ||
# However the tags are totally unusable for our case | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
- name: Build and push Docker image | ||
uses: docker/[email protected] | ||
with: | ||
context: ci | ||
file: ci/Dockerfile.${{ matrix.distro }} | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.distro }} | ||
labels: ${{ steps.meta.outputs.labels }} |