fix: enable manual workflow_dispatch trigger in Gitea
All checks were successful
Deploy / deploy (push) Successful in 13s
All checks were successful
Deploy / deploy (push) Successful in 13s
- 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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user