Skip to content

Commit 3189da7

Browse files
authored
CI: use circle api v2 to trigger builds (#9094)
Builds triggered with v1 don't have access to the context, v2 doesn't have this restriction.
1 parent b57b9dd commit 3189da7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
run: |
1616
curl --request POST \
1717
--silent --output /dev/null \
18-
--url https://circleci.com/api/v1.1/project/github/${{ secrets.CORPORATE_REPO }}/tree/main \
18+
--url https://circleci.com/api/v2/project/gh/${{ secrets.CORPORATE_REPO }}/pipeline \
1919
--user '${{ secrets.CIRCLECI_USER_TOKEN }}:' \
20-
--data 'build_parameters[CIRCLE_JOB]=${{ secrets.CIRCLECI_JOB }}'
20+
--header 'content-type: application/json' \
21+
--data '{"branch": "main", "parameters":{"CIRCLE_JOB": "${{ secrets.CIRCLECI_JOB }}"}}'

0 commit comments

Comments
 (0)