mirror of
https://github.com/SonarSource/sonarqube-scan-action.git
synced 2025-12-16 10:58:28 +00:00
SQSCANGHA-4 Publish MAJOR and MAJOR.MINOR tags in addition to MAJOR.MINOR.PATCH (#35)
This commit is contained in:
parent
fd8151470c
commit
26fe7d6b0e
1 changed files with 32 additions and 0 deletions
32
.github/workflows/update-tags.yml
vendored
Normal file
32
.github/workflows/update-tags.yml
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
name: Update Tags
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- v*.*.*
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
generate:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Parse semver
|
||||||
|
uses: madhead/semver-utils@v2
|
||||||
|
id: version
|
||||||
|
with:
|
||||||
|
version: ${{ github.ref_name }}
|
||||||
|
|
||||||
|
- name: Update tags
|
||||||
|
run: |
|
||||||
|
TAGS='v${{ steps.version.outputs.major }} v${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}'
|
||||||
|
|
||||||
|
for t in $TAGS; do
|
||||||
|
git tag -f "$t"
|
||||||
|
git push origin ":$t" 2>/dev/null || true
|
||||||
|
git push origin "$t"
|
||||||
|
done
|
||||||
Loading…
Reference in a new issue