publish docker image on release #16
Workflow file for this run
This file contains 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-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 |