From 8249df15df9efccdbe4d848ec1345891df60f4f4 Mon Sep 17 00:00:00 2001 From: tracer Date: Tue, 10 Feb 2026 20:20:20 +0100 Subject: [PATCH] update stable if push to master is successful --- .gitea/workflows/commit.yaml | 21 +++++++++++++++++++++ composer.json | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/commit.yaml b/.gitea/workflows/commit.yaml index 97aefc2..1b7b5d8 100644 --- a/.gitea/workflows/commit.yaml +++ b/.gitea/workflows/commit.yaml @@ -37,3 +37,24 @@ jobs: echo "$ANSIBLE_VAULT_PASSWORD" > .vault_pass.txt ansible-playbook --vault-password-file .vault_pass.txt deploy-to-prod.yaml rm .vault_pass.txt + + promote_stable: + runs-on: debian-latest + needs: deploy + steps: + - name: Promote master to stable + env: + SPEEDBB_REPO: ${{ vars.SPEEDBB_REPO }} + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + GITEA_ACTOR: ${{ gitea.actor }} + run: | + set -e + REPO="$SPEEDBB_REPO" + if [ -n "$GITEA_TOKEN" ]; then + REPO=$(echo "$SPEEDBB_REPO" | sed "s#https://#https://${GITEA_ACTOR}:${GITEA_TOKEN}@#") + fi + git clone --quiet --depth=1 --branch=stable "$REPO" repo + cd repo + git fetch origin master + git merge --ff-only origin/master + git push origin stable diff --git a/composer.json b/composer.json index 1dcd11c..e28ebeb 100644 --- a/composer.json +++ b/composer.json @@ -98,5 +98,5 @@ "minimum-stability": "stable", "prefer-stable": true, "version": "26.0.2", - "build": "45" + "build": "49" }