ci: push to docker registry
All checks were successful
build / lint (push) Successful in 12s
build / build (push) Successful in 35s
build / docker image (push) Successful in 52s

This commit is contained in:
2026-01-30 12:45:38 +00:00
parent 7521fa2b10
commit 9581f4597c

View File

@@ -73,3 +73,44 @@ jobs:
.next/standalone
.next/static
public
docker:
name: docker image
runs-on: ubuntu-latest
needs: [build]
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref_name, 'feature-'))
env:
REGISTRY: gitea.wittrail.com
IMAGE_NAME: wittrail/polynote
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=tag
type=sha
- name: Log in to registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}