Skip to content

.github/workflows/dispatch-test.yml #2

.github/workflows/dispatch-test.yml

.github/workflows/dispatch-test.yml #2

Workflow file for this run

on:
workflow_dispatch:
inputs:
repoCache:
description: "Reset or disable the cache?"
type: choice
default: enabled
options:
- enabled
- disabled
- reset
permissions: {}
env:
REPO: '4m-mazi/gh-test'
jobs:
dispatch:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: 'Create a repository dispatch event'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${{ env.REPO }}/dispatches \
-f "event_type=debug" -F "client_payload[repoCache]=${{ inputs.repoCache }}"