Skip to content

publish docker image on release #16

publish docker image on release

publish docker image on release #16

name: publish-docker-image-on-release
run-name: publish docker image on release
on:
release:
types: [published]
branches: [main]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and publish docker image
run: |
mvn package jib:dockerBuild -DskipTests
docker tag bigquery-antipattern-recognition ghcr.io/googlecloudplatform/bigquery-antipattern-recognition:latest
docker push ghcr.io/googlecloudplatform/bigquery-antipattern-recognition:latest