Skip to content
Closed
Prev Previous commit
Next Next commit
chore
  • Loading branch information
s1n7ax committed Aug 8, 2025
commit a9a6fb509a0a6689207c5c5e3982470b36c12c74
12 changes: 6 additions & 6 deletions .github/workflows/trigger-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ jobs:

steps:
- name: Trigger workflow in nvim-java/tests
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
run: |
OWNER="nvim-java"
REPO="tests"

# Get workflows and extract URL and ID for "Test nvim-java Plugin"

echo "** ${TEST_TOKEN}"

response=$(curl -s -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${TEST_TOKEN}" \
-H "Authorization: Bearer $TEST_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/$OWNER/$REPO/actions/workflows")

Expand All @@ -43,7 +43,7 @@ jobs:
dispatch_response=$(curl -s -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${TOKEN}" \
-H "Authorization: Bearer $TEST_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/$OWNER/$REPO/actions/workflows/$workflow_id/dispatches" \
-d '{"ref":"main"}')
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
sleep 5
runs_response=$(curl -s -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${TOKEN}" \
-H "Authorization: Bearer $TEST_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/$OWNER/$REPO/actions/workflows/$workflow_id/runs?per_page=1")

Expand All @@ -95,7 +95,7 @@ jobs:
while true; do
run_response=$(curl -s -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${TOKEN}" \
-H "Authorization: Bearer $TEST_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/$OWNER/$REPO/actions/runs/$run_id")

Expand Down