Skip to content

Commit

Permalink
Add workflow action to build tag-based docker images (#94)
Browse files Browse the repository at this point in the history
Co-authored-by: Erick Camacho <erickc@spotify.com>
  • Loading branch information
ecamacho and Erick Camacho authored Jan 23, 2023
1 parent 88d83b1 commit e2ceaeb
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,33 @@ jobs:
tag: ${{ github.ref }}
overwrite: true

dockerhub:
name: Publish Docker image
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- 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: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
push: true
tags: spotify/xcmetrics:${{ steps.get_version.outputs.VERSION }}

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit e2ceaeb

Please sign in to comment.