Files
matomo-bootstrap/.github/workflows/stable-tag.yml
Kevin Veen-Birkenbach d41129b6bd ci: deduplicate workflows using reusable test pipeline and stable tagging
- Introduce reusable-test workflow for Ruff + E2E tests
- Refactor CI to call reusable workflow (no duplicated steps)
- Add stable-tag workflow to promote version tags to stable after successful tests

https://chatgpt.com/share/694a7f81-d96c-800f-88cb-7b25b4cdfe1a
2025-12-23 12:46:30 +01:00

43 lines
974 B
YAML

name: Stable Tag
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
test:
uses: ./.github/workflows/reusable-test.yml
with:
python-version: "3.12"
matomo-token-description: "stable-ci-token"
tag-stable:
runs-on: ubuntu-latest
needs: test
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout (full history for tags)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Move stable tag to this version tag commit
run: |
set -euo pipefail
echo "Triggered by tag: ${GITHUB_REF_NAME}"
echo "Commit: ${GITHUB_SHA}"
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git fetch --tags --force
git tag -fa stable -m "stable -> ${GITHUB_REF_NAME} (${GITHUB_SHA})" "${GITHUB_SHA}"
git push --force origin stable