Skip to content

v0.20.0

v0.20.0 #50

name: Push Docker image
on:
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Get version
id: get-version
run: echo "VERSION=$(echo ${{ github.event.release.tag_name }} | cut -dv -f2)" >> $GITHUB_OUTPUT
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to Docker Hub
uses: docker/build-push-action@v5
with:
build-args: |
AUDITOR_VERSION=${{ steps.get-version.outputs.VERSION }}
push: true
tags: |
nbgrp/auditor:${{ steps.get-version.outputs.VERSION }}
nbgrp/auditor:latest