push-docker-image #8
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: Push Docker Image to Docker Hub | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'SemVer format release tag, i.e. 0.24.5' | |
required: true | |
repository_dispatch: | |
types: [ push-docker-image ] | |
jobs: | |
docker-image-push: | |
name: Push Docker Image | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
platforms: linux/amd64 | |
- name: Build and push image | |
uses: docker/build-push-action@v3 | |
with: | |
platforms: linux/amd64 | |
context: . | |
file: ./docker/Dockerfile | |
push: true | |
tags: dolthub/dolt-workbench:${{ github.event.inputs.version || github.event.client_payload.version }} , dolthub/dolt-workbench:latest | |
- name: Update Docker Hub README | |
uses: peter-evans/dockerhub-description@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
repository: dolthub/dolt-workbench | |
readme-filepath: ./docker/README.md |