Skip to content

Commit 4515ae5

Browse files
committed
fix: revert back to 2 tokens
1 parent 5a4629f commit 4515ae5

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

.github/workflows/orca.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,17 @@ jobs:
2727
id: trigger
2828
run: |
2929
response=$(curl \
30-
--silent --show-error \
30+
--silent --show-error --fail \
3131
--request POST \
32-
--header "PRIVATE-TOKEN: ${{ secrets.ORCA_TOKEN }}" \
33-
"https://code.jlab.org/api/v4/projects/${{ secrets.ORCA_PROJECT_ID }}/pipelines?ref=main" \
34-
--data "variables[REF_COATJAVA]=${{ github.head_ref || github.ref_name }}" \
35-
--data "variables[TRIGGERED_BY]=github" \
36-
--data "variables[GITHUB_EVENT]=${{ github.event_name }}" \
37-
--data "variables[GITHUB_REPO]=${{ github.repository }}" \
38-
--data "variables[GITHUB_SHA]=${{ github.sha }}" \
39-
--data "variables[GITHUB_RUN_ID]=${{ github.run_id }}")
32+
--form "token=${{ secrets.ORCA_TRIGGER_TOKEN }}" \
33+
--form "ref=main" \
34+
--form "variables[TRIGGERED_BY]=github" \
35+
--form "variables[GITHUB_EVENT]=${{ github.event_name }}" \
36+
--form "variables[GITHUB_REPO]=${{ github.repository }}" \
37+
--form "variables[GITHUB_SHA]=${{ github.sha }}" \
38+
--form "variables[GITHUB_RUN_ID]=${{ github.run_id }}" \
39+
--form "variables[REF_COATJAVA]=${{ github.head_ref || github.ref_name }}" \
40+
"https://code.jlab.org/api/v4/projects/${{ secrets.ORCA_PROJECT_ID }}/trigger/pipeline")
4041
echo "RESPONSE: $response"
4142
pipeline_id=$(echo $response | jq -r '.id')
4243
web_url=$(echo $response | jq -r '.web_url')
@@ -66,7 +67,7 @@ jobs:
6667
while [ $elapsed -lt $TIMEOUT ]; do
6768
response=$(curl \
6869
--silent --show-error --fail \
69-
--header "PRIVATE-TOKEN: ${{ secrets.ORCA_TOKEN }}" \
70+
--header "PRIVATE-TOKEN: ${{ secrets.ORCA_PROJECT_TOKEN }}" \
7071
"https://code.jlab.org/api/v4/projects/${{ secrets.ORCA_PROJECT_ID }}/pipelines/${{ needs.orca_trigger.outputs.pipeline_id }}")
7172
status=$(echo $response | jq -r '.status')
7273
echo "Current status: $status (elapsed: ${elapsed}s)"
@@ -109,7 +110,7 @@ jobs:
109110
--silent --show-error --fail \
110111
--write-out "\n%{http_code}" \
111112
--request POST \
112-
--header "PRIVATE-TOKEN: ${{ secrets.ORCA_TOKEN }}" \
113+
--header "PRIVATE-TOKEN: ${{ secrets.ORCA_PROJECT_TOKEN }}" \
113114
"https://code.jlab.org/api/v4/projects/${{ secrets.ORCA_PROJECT_ID }}/pipelines/${{ needs.orca_trigger.outputs.pipeline_id }}/cancel")
114115
http_code=$(echo "$response" | tail -n1)
115116
response_body=$(echo "$response" | sed '$d')

0 commit comments

Comments
 (0)