Skip to content

Commit 71246bb

Browse files
author
Andreas Beuge
committed
chore: add tag trigger to the pipeline
1 parent bc3d5af commit 71246bb

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/ci.update-major-version-tag.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,22 @@ on:
44
release:
55
types:
66
- published
7+
push:
8+
tags:
9+
- "v*.*.*"
710
workflow_dispatch:
811
inputs:
912
tag:
1013
description: "Semver tag to align the major tag to (e.g. v8.3.8)"
1114
required: true
1215

16+
permissions:
17+
contents: write
18+
1319
jobs:
1420
update-major-tag:
1521
runs-on: ubuntu-latest
16-
if: ${{ github.event_name == 'workflow_dispatch' || github.event.release.prerelease == false }}
22+
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' || github.event.release.prerelease == false }}
1723
steps:
1824
- name: Checkout
1925
uses: actions/checkout@v6
@@ -22,7 +28,7 @@ jobs:
2228
- name: Extract major version
2329
id: version
2430
run: |
25-
TAG_NAME="${{ github.event.inputs.tag || github.event.release.tag_name }}"
31+
TAG_NAME="${{ github.event.inputs.tag || github.event.release.tag_name || github.ref_name }}"
2632
echo "Resolved tag: $TAG_NAME"
2733
if [[ ! "$TAG_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
2834
echo "::notice::'$TAG_NAME' is not a release semver tag (vX.Y.Z); skipping major-tag update."

0 commit comments

Comments
 (0)