20 lines
563 B
YAML
20 lines
563 B
YAML
name: Trigger Ansible Deploy
|
|
inputs:
|
|
task:
|
|
required: true
|
|
token:
|
|
required: true
|
|
ansible-repo:
|
|
default: alex/homelab
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- shell: bash
|
|
run: |
|
|
curl -fsS -X POST \
|
|
-H "Authorization: token ${{ inputs.token }}" \
|
|
-H "Content-Type: application/json" \
|
|
"${{ github.server_url }}/api/v1/repos/${{ inputs.ansible-repo }}/actions/workflows/deploy.yml/dispatches" \
|
|
-d "$(jq -nc --arg task "${{ inputs.task }}" \
|
|
'{ref:"main", inputs:{task:$task}}')"
|