Skip to content

Commit d51f5b1

Browse files
authored
Merge pull request #65 from encryption4all/fix/delivery-semver-tags
fix: trigger delivery on tag push for semver Docker tags
2 parents 68c8542 + e75c707 commit d51f5b1

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

.github/workflows/delivery.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ name: Delivery
33
on:
44
push:
55
branches: [main]
6+
tags: ['v*']
67
pull_request:
78
branches: [main]
8-
release:
9-
types: [published]
109
workflow_dispatch:
1110

1211
permissions:
@@ -26,7 +25,7 @@ jobs:
2625
- name: Select build profile
2726
id: config
2827
run: |
29-
if [ "${{ github.event_name }}" = "release" ]; then
28+
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
3029
echo "profile=release" >> "$GITHUB_OUTPUT"
3130
else
3231
echo "profile=edge" >> "$GITHUB_OUTPUT"
@@ -82,7 +81,7 @@ jobs:
8281
- name: Select build profile
8382
id: config
8483
run: |
85-
if [ "${{ github.event_name }}" = "release" ]; then
84+
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
8685
echo "profile=release" >> "$GITHUB_OUTPUT"
8786
else
8887
echo "profile=edge" >> "$GITHUB_OUTPUT"
@@ -124,7 +123,7 @@ jobs:
124123
tags: |
125124
type=semver,pattern={{version}},event=tag
126125
type=semver,pattern={{major}}.{{minor}},event=tag
127-
type=edge,enable=${{ github.event_name != 'release' }}
126+
type=edge,enable=${{ !startsWith(github.ref, 'refs/tags/') }}
128127
type=ref,event=pr
129128
type=ref,event=branch,enable=${{ github.event_name == 'workflow_dispatch' }}
130129

0 commit comments

Comments
 (0)