Skip to content

feat(ci): trigger orca #4

feat(ci): trigger orca

feat(ci): trigger orca #4

Workflow file for this run

name: orca
on:
pull_request:
push:
branches: [ development ]
tags: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
trigger_orca:
runs-on: ubuntu-latest
steps:
- name: trigger orca pipeline
id: trigger
run: |
response=$(curl -X POST \
-F "token=${{ secrets.ORCA_TRIGGER_TOKEN }}" \
-F "ref=main" \
-F "variables[TRIGGERED_BY]=github" \
-F "variables[GITHUB_REPO]=${{ github.repository }}" \
-F "variables[GITHUB_SHA]=${{ github.sha }}" \
-F "variables[GITHUB_RUN_ID]=${{ github.run_id }}" \
-F "variables[REF_COATJAVA]=${{ github.head_ref || github.ref_name }}" \
"https://code.jlab.org/api/v4/projects/${{ secrets.ORCA_PROJECT_ID }}/trigger/pipeline")
echo "RESPONSE: $response"
pipeline_id=$(echo $response | jq -r '.id')
web_url=$(echo $response | jq -r '.web_url')
if [ "$pipeline_id" == "null" ] || [ -z "$pipeline_id" ]; then
echo "ERROR: Failed to trigger pipeline" >&2
exit 1
fi
echo "pipeline_id=$pipeline_id" >> $GITHUB_OUTPUT
echo "web_url=$web_url" >> $GITHUB_OUTPUT
echo "Pipeline triggered successfully!"
echo "Pipeline URL: $web_url"
echo "Pipeline URL: <$web_url>" >> $GITHUB_STEP_SUMMARY