Skip to content

Create images

Create images #650

Workflow file for this run

name: Create images
on:
pull_request:
workflow_dispatch:
push:
branches:
- main
schedule:
# every day
- cron: '10 0 * * *'
jobs:
build:
strategy:
matrix:
image:
- alma8
- alma9
- alma9-clang
- debian125
- fedora39
- fedora40
- ubuntu20
- ubuntu22
- ubuntu2404
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: registry.cern.ch
username: robot-root-ci+github
password: ${{ secrets.CR_PAT }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./${{ matrix.image }}/
push: ${{ github.event_name != 'pull_request' }}
tags: registry.cern.ch/root-ci/${{ matrix.image }}:buildready
labels: org.opencontainers.image.source=https://github.com/${{ github.repository }}
no-cache: ${{ github.event_name != 'push' && github.event_name != 'pull_request' }}
cache-from: type=gha,scope=${{ matrix.image }}
cache-to: type=gha,mode=max,scope=${{ matrix.image }}