v1.1.0 #3
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 to DockerHub | |
on: | |
release: | |
types: [ published ] | |
workflow_dispatch: {} | |
jobs: | |
build-and-publish: | |
name: Build image and Publish to DockerHub | |
runs-on: ubuntu-latest | |
steps: | |
# This action checks-out your repository under $GITHUB_WORKSPACE, so your workflow can access it. | |
- name: Checkout | |
id: checkout | |
uses: actions/checkout@v3 | |
# GitHub Action to install QEMU static binaries. | |
- name: Setup QEMU | |
id: setup-qemu | |
uses: docker/setup-qemu-action@v3 | |
# This action will create and boot a builder that can be used in the following steps of your workflow if you're using Buildx or the build-push action. | |
- name: Setup Docker Buildx | |
id: setup-docker-buildx | |
uses: docker/setup-buildx-action@v3 | |
# GitHub Action to login against a Docker registry. | |
- name: Login to Docker Hub | |
id: login-to-docker-hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
# GitHub Action to build and push Docker images with Buildx with full support of the features provided by Moby BuildKit builder toolkit. | |
- name: Build and Push | |
id: build-and-push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: elmernocon/semverkit:latest,elmernocon/semverkit:${{ github.event.release.tag_name }} |