Skip to content

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

.github/workflows/dispatch-test.yml

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

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: {}
jobs:
dispatch:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: 'Create a repository dispatch event'
env:
GH_TOKEN: ${{ github.token }}
REPO: '4m-mazi/gh-test'
CACHE: ${{ inputs.repoCache }}
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/repos/$REPO/dispatches" \
-f "event_type=debug" -F "client_payload[repoCache]=$CACHE"