Merge pull request #343 from vegaprotocol/342-adding-spot-markets-to-… #145
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 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 }} |