Skip to content

Fix Python wheel version and Go test filename in release #122

Fix Python wheel version and Go test filename in release

Fix Python wheel version and Go test filename in release #122

name: Publish Docker Image
on:
push:
branches: [main]
pull_request:
concurrency:
group: docker-${{ github.ref }}
cancel-in-progress: true
env:
REGISTRY: ghcr.io
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}
tags: type=raw,value=latest
- name: Build and push image
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
context: .
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max