Skip to content

Merge pull request #1 from d-bytebase/d-bytebase-patch-1 #2

Merge pull request #1 from d-bytebase/d-bytebase-patch-1

Merge pull request #1 from d-bytebase/d-bytebase-patch-1 #2

name: Build and push image to docker hub
on:
push:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
docker:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- docker-image-tag: "dev-ci"
docker-build-args: "RELEASE="
- docker-image-tag: "release-ci"
docker-build-args: "RELEASE=release"
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
file: Dockerfile
push: true
tags: bytebase/bytebase:${{ matrix.docker-image-tag }}
build-args: ${{ matrix.docker-build-args }}
- name: Image digest
run: echo "Successfully pushed bytebase/bytebase:${{ matrix.docker-image-tag }} " ${{ steps.docker_build.outputs.digest }}