Enabled a workflow dispatch to smoke test the release process. Ensuri… #39
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: Build dockers | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
docker: | |
name: Build dockers | |
runs-on: ubuntu-latest | |
if: (github.repository == 'redislabs/memtier_benchmark') | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: docker/setup-qemu-action@v2 | |
- uses: docker/setup-buildx-action@v2 | |
with: | |
install: true | |
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7 | |
- uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: build and push in master | |
uses: docker/build-push-action@v4 | |
if: ${{ github.event.release.tag_name == '' }} | |
with: | |
push: true | |
tags: ${{ vars.DOCKERHUB_REPO }}:edge | |
context: . | |
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7 | |
- name: build and push on release | |
uses: docker/build-push-action@v4 | |
if: ${{ github.event.release.tag_name != '' }} | |
with: | |
push: true | |
tags: ${{ vars.DOCKERHUB_REPO }}:${{ github.event.release.tag_name }} | |
context: . | |
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7 |