Skip to content

⚗️ Updated QuickCell experiment. #3438

⚗️ Updated QuickCell experiment.

⚗️ Updated QuickCell experiment. #3438

Workflow file for this run

name: 🐳 • Docker Image
on:
push:
branches: [ 'main' ]
paths:
- '**/*.hpp'
- '**/*.cpp'
- '**/*.cmake'
- '**/CMakeLists.txt'
- 'libs/**'
- '.github/workflows/docker-image.yml'
- 'Dockerfile'
- '.dockerignore'
- '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
pull_request:
branches: [ 'main' ]
paths:
- '**/*.hpp'
- '**/*.cpp'
- '**/*.cmake'
- '**/CMakeLists.txt'
- 'libs/**'
- '.github/workflows/docker-image.yml'
- 'Dockerfile'
- '.dockerignore'
- '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
merge_group:
workflow_dispatch:
release:
types: [ published ]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
name: 🐳 Build and publish Docker image
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Log in to Docker Hub
if: github.event_name == 'release' && github.event.action == 'published'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to GitHub Container Registry
if: github.event_name == 'release' && github.event.action == 'published'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
if: github.event_name == 'release' && github.event.action == 'published'
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ secrets.DOCKER_USERNAME }}/fiction
ghcr.io/${{ github.repository }}
tags: |
${{ github.event.release.tag_name || 'dev' }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: ${{ github.workspace }}
file: Dockerfile
push: ${{ github.event_name == 'release' && github.event.action == 'published' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels || '' }}
- name: Push README as DockerHub project description
if: github.event_name == 'release' && github.event.action == 'published'
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: ${{ secrets.DOCKER_USERNAME }}/fiction
short-description: ${{ steps.meta.outputs.labels.description || '' }}
readme-filepath: ${{ github.workspace }}/README.md
- name: Generate artifact attestation
if: github.event_name == 'release' && github.event.action == 'published'
uses: actions/attest-build-provenance@v1
with:
subject-name: docker.io/${{ secrets.DOCKER_USERNAME }}/fiction
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true