From a7cf2ea05f26dcb9957cb44c8298b1249296afa7 Mon Sep 17 00:00:00 2001 From: domverse Date: Mon, 16 Mar 2026 21:57:30 +0100 Subject: [PATCH] fix: enable manual workflow_dispatch trigger in Gitea - Add inputs block to workflow_dispatch so Gitea shows the Run button - Skip version bump on manual triggers to allow redeployment without bumping - Fall back to VERSION file for APP_VERSION on manual runs Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/deploy.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index af0c621..87d9fa5 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -5,6 +5,11 @@ on: branches: - main workflow_dispatch: + inputs: + reason: + description: "Reason for manual deploy" + required: false + default: "manual" env: COMPOSE_PROJECT: outline-sync @@ -20,6 +25,7 @@ jobs: token: ${{ secrets.GITEA_TOKEN }} - name: Bump patch version + if: github.event_name != 'workflow_dispatch' run: | VERSION=$(cat VERSION) MAJOR=$(echo $VERSION | cut -d. -f1) @@ -44,8 +50,9 @@ jobs: - name: Deploy with docker compose run: | - echo "=== Deploying ${{ env.APP_VERSION }} (commit ${{ gitea.sha }}) to ${{ gitea.ref_name }} ===" - docker compose -f "$COMPOSE_FILE" -p "$COMPOSE_PROJECT" build --build-arg APP_VERSION=${{ env.APP_VERSION }} + APP_VERSION=${APP_VERSION:-$(cat VERSION)} + echo "=== Deploying $APP_VERSION (commit ${{ gitea.sha }}) to ${{ gitea.ref_name }} ===" + docker compose -f "$COMPOSE_FILE" -p "$COMPOSE_PROJECT" build --build-arg APP_VERSION=$APP_VERSION docker compose -f "$COMPOSE_FILE" -p "$COMPOSE_PROJECT" up -d --remove-orphans - name: Prune dangling images