67 lines
1.9 KiB
YAML
67 lines
1.9 KiB
YAML
name: "Wait For Manual Approval (Gitea/GitHub + Apprise)"
|
|
description: "Pauses workflow until designated approvers comment with approval or denial keywords."
|
|
|
|
inputs:
|
|
token:
|
|
description: "API token for GitHub or Gitea"
|
|
required: true
|
|
|
|
api_url:
|
|
description: "Root API URL (e.g., https://git.example.com/api/v1)"
|
|
required: true
|
|
|
|
repo_owner:
|
|
description: "Repository owner/org"
|
|
required: true
|
|
|
|
repo_name:
|
|
description: "Repository name"
|
|
required: true
|
|
|
|
approvers:
|
|
description: "Comma-separated list of approver usernames"
|
|
required: true
|
|
|
|
approval_keywords:
|
|
description: "Comma-separated keywords meaning APPROVED"
|
|
default: "approve,approved,yes,lgtm"
|
|
|
|
denial_keywords:
|
|
description: "Comma-separated keywords meaning DENIED"
|
|
default: "deny,denied,no"
|
|
|
|
poll_interval:
|
|
description: "Seconds between each comment check"
|
|
default: "10"
|
|
|
|
reminder_interval:
|
|
description: "Seconds between reminders (0 disables reminders)"
|
|
default: "0"
|
|
|
|
apprise_api_url:
|
|
description: "URL to Apprise API (optional)"
|
|
required: false
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Make scripts executable
|
|
shell: bash
|
|
run: chmod +x "$GITHUB_ACTION_PATH/wait-for-approval.sh" "$GITHUB_ACTION_PATH/notify"
|
|
|
|
- name: Run wait-for-approval
|
|
shell: bash
|
|
env:
|
|
TOKEN: ${{ inputs.token }}
|
|
API_URL: ${{ inputs.api_url }}
|
|
REPO_OWNER: ${{ inputs.repo_owner }}
|
|
REPO_NAME: ${{ inputs.repo_name }}
|
|
APPROVERS: ${{ inputs.approvers }}
|
|
APPROVAL_KEYWORDS: ${{ inputs.approval_keywords }}
|
|
DENIAL_KEYWORDS: ${{ inputs.denial_keywords }}
|
|
POLL_INTERVAL: ${{ inputs.poll_interval }}
|
|
REMINDER_INTERVAL: ${{ inputs.reminder_interval }}
|
|
APPRISE_API_URL: ${{ inputs.apprise_api_url }}
|
|
run: |
|
|
bash "$GITHUB_ACTION_PATH/wait-for-approval.sh"
|