Skip to content

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

.github/workflows/test-dispatch.yml

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

Workflow file for this run

on:
workflow_dispatch:
permissions: {}
jobs:
dispatch:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- name: Check for file
env:
GITHUB_REPOSITORY: ${{ github.repository }}
BRANCH: ${{ github.ref_name }}
shell: bash
run: |
RESP_CODE=$(curl -w %{http_code} -s -L -o __response.json \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ github.token }}"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/$GITHUB_REPOSITORY/actions/workflows/missing-file.yml/dispatches \
-d "{\"ref\":\"$BRANCH\"}"
)
echo "RESP_CODE is $RESP_CODE"
cat __response.json