Skip to content

Commit

Permalink
updating github workflow
Browse files Browse the repository at this point in the history
- adding major version tag
- adding docker hub description update
  • Loading branch information
tobiasehlert committed Jul 28, 2023
1 parent 1b920c2 commit 51e9083
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ on:
- "main"
- "feature-*"
- "bug-*"
tags:
- "v*"
paths:
- "src/**"
- "Dockerfile"
- "go.mod"
- "go.sum"
release:
types: [published]

jobs:
build:
Expand All @@ -32,6 +32,7 @@ jobs:
type=edge
type=ref,event=branch,enable=${{ (github.ref != 'refs/heads/main') }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
- name: Set up QEMU
Expand Down Expand Up @@ -76,3 +77,12 @@ jobs:
cache-to: type=local,dest=/tmp/.buildx-cache
build-args: |
apiVersion=${{ fromJSON(steps.docker_meta.outputs.json).labels['org.opencontainers.image.version'] }}
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v3
if: github.ref == 'refs/heads/main'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: peterevans/dockerhub-description
short-description: ${{ github.event.repository.description }}

0 comments on commit 51e9083

Please sign in to comment.