Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 19 additions & 14 deletions .github/workflows/publish-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,32 @@ on:
- v**
workflow_dispatch: # Allows to trigger the workflow manually in GitHub UI

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: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3.3.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5.5.1
with:
images: tablegpt/ipy-kernel
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# semver has default priority 900, sha has default priority 100
# ref has default priority 600
# see <https://github.com/docker/metadata-action#priority-attribute>
Expand All @@ -33,18 +41,15 @@ jobs:
type=semver,pattern={{version}}
type=sha,priority=850,prefix=
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6.9.0
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# dockerhub-description requires checkout
- uses: actions/checkout@v4
- name: TableGPT Kernel Docker Hub Description
uses: peter-evans/dockerhub-description@v4
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: tablegpt/ipy-kernel
short-description: TableGPT Ipython Kernel
readme-filepath: ./README.md
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true