Skip to content

fedora40

fedora40 #4

Workflow file for this run

---
name: fedora40
on:
pull_request:
push:
paths:
- 'fedora40/**'
- '.github/workflows/fedora40.yml'
schedule:
- cron: '10 6,15 * * 1,6'
workflow_dispatch:
permissions: write-all
jobs:
# Test the image builds and works correctly.
test:
name: Test fedora40
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v4.1.1
- name: Test building image.
run: cd fedora40 && docker build -t fedora40 .
- name: Run the built image.
run: docker run --name test-container -d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro fedora40
# If on master branch, build and release image.
release:
name: Release
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v3.2.0
- name: Login to DockerHub
uses: docker/login-action@v3.1.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image.
uses: docker/build-push-action@v5.3.0
with:
context: fedora40/
file: fedora40/Dockerfile
platforms: linux/amd64, linux/arm64, linux/ppc64le, linux/s390x
push: true
tags: |
${{ github.repository }}:fedora40