Skip to content

Python version update #2

Python version update

Python version update #2

Workflow file for this run

name: Create and publish a Docker image
on:
push:
branches:
- main
tags: [ '*' ]
workflow_dispatch: # Manual run
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
# HeSPI sheet-component YOLO (baked into image at build time)
WEIGHTS_URL: https://github.com/rbturnbull/hespi/releases/download/v0.4.0/sheet-component.pt.gz
jobs:
publish-docker-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Log in to the Container registry
uses: docker/login-action@v3.7.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5.10.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6.19.2
with:
context: .
push: true
pull: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
WEIGHTS_URL=${{ env.WEIGHTS_URL }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v4
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true