Skip to content

Update fedora

Update fedora #281

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: '0 3 * * FRI'
jobs:
CI:
continue-on-error: ${{ matrix.config.continue-on-error == 'true' }}
strategy:
matrix:
config:
- {dockerfile: 'fedora', tag: 'fedora'}
- {dockerfile: 'fedora', tag: 'fedora_mpich', build_args: 'MPI=mpich'}
- {dockerfile: 'fedora', tag: 'fedora_rawhide', build_args: 'TAG=rawhide,MPI=mpich', continue-on-error: 'true'}
- {dockerfile: 'ubuntu', tag: 'ubuntu'}
- {dockerfile: 'ubuntu', tag: 'ubuntu_mpich', build_args: 'MPI=mpich'}
- {dockerfile: 'ubuntu', tag: 'ubuntu_rolling', build_args: 'TAG=rolling'}
- {dockerfile: 'ubuntu', tag: 'ubuntu_devel', build_args: 'TAG=devel', continue-on-error: 'true'}
- {dockerfile: 'opensuse', tag: 'opensuse', continue-on-error: 'true'}
- {dockerfile: 'fedora', tag: 'fedora_intel', build_args: 'TAG=40,INTEL=yes,PYTHON=python3.11', continue-on-error: 'true'}
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Convert build_args
id: build_args
run: |
echo "args<<EOF" >> $GITHUB_OUTPUT
echo ${{ matrix.config.build_args }} | sed 's/,/\n/g' >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Build and Push Docker images for Docker
uses: docker/build-push-action@v5
with:
tags: espressopp/buildenv:${{ matrix.config.tag }}
file: ${{ matrix.config.dockerfile }}
build-args: ${{ steps.build_args.outputs.args }}
pull: true
push: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}