Skip to content

feat: auto-trigger code sample testing #6

feat: auto-trigger code sample testing

feat: auto-trigger code sample testing #6

name: Test API Docs Code Samples
on:
push:
paths:
- 'apify-api/openapi/code_samples/**'
pull_request:
paths:
- 'apify-api/openapi/code_samples/**'
jobs:
call-apify-actor:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Get current branch name
id: get-branch-name
run: echo "branch_name=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
- name: Call Code Sample Tester Actor
env:
APIFY_TOKEN: apify_api_Hh2OPyR6MPVJ6te8pkfe27vS09aL1f2lquSt
BRANCH_NAME: ${{ env.branch_name }}
run: |
curl -X POST "https://api.apify.com/v2/acts/X8D0L4wfpO8fCL1uL/run-sync" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-d '{ "branch": "'"$BRANCH_NAME"'" }'