Skip to content

Commit

Permalink
Fix tag regex
Browse files Browse the repository at this point in the history
  • Loading branch information
pschork committed Jun 1, 2024
1 parent b7d1263 commit 1d3b524
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/docker-publish-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ on:
push:
branches:
- pschork/semver
- release/*
tags:
- v*
pull_request:
workflow_dispatch:
inputs:
ref:
description: "Branch or SHA"
required: false
type: string

env:
REGISTRY: ghcr.io
Expand All @@ -23,6 +29,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}
fetch-depth: 0

- name: Install GitVersion
Expand Down Expand Up @@ -67,6 +74,7 @@ jobs:
run: make docker-release-build
if: ${{ success() }}

# Publish if manually triggered or when semver tag is pushed
- name: Push docker image release
run: make docker-release-push
if: github.event_name == 'workflow_dispatch'
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v')
2 changes: 1 addition & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ branches:
increment: None
prevent-increment-of-merged-branch-version: true
track-merge-target: false
regex: ^releases?[/-]
regex: ^v*|^releases?[/-]
source-branches:
- main
- release
Expand Down

0 comments on commit 1d3b524

Please sign in to comment.