Skip to content

Merge pull request #338 from vegaprotocol/perf-tool-market-prop-price… #142

Merge pull request #338 from vegaprotocol/perf-tool-market-prop-price…

Merge pull request #338 from vegaprotocol/perf-tool-market-prop-price… #142

name: Build and Publish Docker image
on:
push:
branches:
- develop
tags:
- "*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set docker image tag
id: vars
run: |
ref="$(echo -n "${GITHUB_REF#refs/*/}" | tr -c 'A-Za-z0-9._' -)"
if [[ "$ref" == "develop" ]] ; then ref=latest ; fi
echo ::set-output "name=tag::$ref"
- name: Build
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ secrets.DOCKERHUB_USERNAME }}/vegatools:${{ steps.vars.outputs.tag }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}