fix attestations #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish-images | |
on: | |
push: | |
workflow_dispatch: | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build-and-push-image: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
attestations: write | |
id-token: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
- name: Log in to the Container registry | |
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker image | |
id: push | |
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 | |
with: | |
context: . | |
file: ./Dockerfile-notebook-base | |
build-args: | | |
DASK_VERSION=2025.7.0 | |
PYTHON_VERSION=3.13 | |
push: true | |
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-notebook-base | |
# create an attestation to prove that this image came from a workflow in this repository | |
- name: Generate artifact attestation | |
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2.4.0 | |
with: | |
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-notebook-base | |
subject-digest: ${{ steps.push.outputs.digest }} | |
push-to-registry: true |