Skip to content

Commit

Permalink
Update release-docker.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
benknoll-umn authored Oct 31, 2023
1 parent e1eb332 commit 246ca05
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/release-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
name: Create and publish a Docker image

on:
release:
types: [published]
push:
tags:
- v*
workflow_dispatch:

env:
Expand All @@ -36,13 +37,6 @@ jobs:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get version number
id: version
run: |
export VERSION=$(git describe)
export VERSION=${VERSION#v}
echo "patch=${VERSION}" >> $GITHUB_OUTPUT
echo "minor=${VERSION%.*}}" >> $GITHUB_OUTPUT
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
Expand All @@ -52,8 +46,9 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest
type=semver,pattern=${{ steps.version.outputs.patch }}
type=semver,pattern=${{ steps.version.outputs.minor }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
Expand Down

0 comments on commit 246ca05

Please sign in to comment.