Files
action-tests/.gitea/workflows/test-dispatch.yaml
T
2026-05-22 23:12:32 +00:00

34 lines
1.0 KiB
YAML

name: Test Dispatch
on:
workflow_dispatch:
inputs:
restart:
description: Restart gitea after updating the theme files
required: false
type: boolean
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: |-
curl -sv "$GITHUB_API_URL/repos/codinget/actions-test/actions/workflows/test-inputs.yaml/dispatches" \
-X POST \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ref": "refs/heads/main",
"inputs": {
"restart": ${{ inputs.restart }}
}
}'
test-with-tea:
runs-on: ubuntu-latest
steps:
- name: Install tea
run: apt update && apt install -y tea-cli
- name: Add token
run: tea login add --url "$GITHUB_SERVER_URL" --token "$GITEA_TOKEN"
- name: Trigger with tea
run: tea actions workflows dispatch -r "$GITHUB_REPOSITORY" -r main --login "$GITHUB_SERVER_URL" test-inputs.yaml