diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 4c89c70..f5e552e 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -1,10 +1,9 @@ # -name: Create and publish a Docker image +name: Build Docker Image and Push to GitHub Container Registry -# Configures this workflow to run every time a change is pushed to the branch called `release`. on: - push: - branches: ['main'] + release: + types: [published] # Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. env: @@ -46,5 +45,5 @@ jobs: push: true tags: | ghcr.io/${{ github.repository_owner }}/magi:latest - ghcr.io/${{ github.repository_owner }}/magi:${{ github.run_id }} + ghcr.io/${{ github.repository_owner }}/magi:${{ github.event.release.tag_name }} labels: ${{ steps.meta.outputs.labels }}