v-2024-05-10.1 #248
Workflow file for this run
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 image to Docker Hub | |
on: | |
release: | |
types: [published] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Docker Setup Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Docker Login | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
- name: Build and push Docker images | |
uses: docker/build-push-action@v4 | |
with: | |
build-args: GIT_COMMIT_SHA=${{ github.ref_name }} | |
cache-from: metabrainz/listenbrainz:cache | |
# use mode=max to cache intermediate layers as well | |
cache-to: type=registry,mode=max,oci-mediatypes=true,compression=zstd,compression-level=7,ref=metabrainz/listenbrainz:cache | |
push: true | |
tags: metabrainz/listenbrainz:${{ github.ref_name }} | |
target: listenbrainz-prod |