Test on poetry #5
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: Push Docker image on release | |
on: | |
release: | |
types: [published] | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Extract tag name | |
id: extract_tag | |
run: echo "::set-output name=tag::${GITHUB_REF#refs/tags/}" | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
provenance: mode=max | |
sbom: true | |
tags: mattholy/wand:${{ steps.extract_tag.outputs.tag }} | |
build-args: VERSION=${{ steps.extract_tag.outputs.tag }} |