docker login action v3 #20
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: Docker Build & Publish | |
on: | |
push: | |
tags: | |
# Assemblyline tags start with 4.4. | |
- '4.4.*' | |
env: | |
REGISTRY: opswat | |
REPO_NAME: ${{ github.event.repository.name }} | |
jobs: | |
dockerbuild: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USER }} | |
password: ${{ secrets.DOCKERHUB_PASS }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
tags: ${{ env.REGISTRY }}/${{ env.REPO_NAME }}:${{ github.ref_name }} | |
build-args: version=${{ github.ref_name }} | |