mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-21 21:25:38 +00:00
20 lines
736 B
YAML
20 lines
736 B
YAML
name: test-hudson-trigger
|
|
on:
|
|
workflow_dispatch: {}
|
|
jobs:
|
|
trigger:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Trigger hudson job
|
|
shell: bash
|
|
run: |
|
|
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
|
|
JOB=SAPSailingAnalytics-master
|
|
elif [ "${{ github.ref }}" =~ refs/heads/releases/.* ]; then
|
|
JOB=$( echo "${{ github.ref }}" | sed -e 's/^refs\/heads\/releases\///' )
|
|
else
|
|
JOB=$( echo "${{ github.ref }}" | sed -e 's/^refs\/heads\///' )
|
|
fi
|
|
echo "Identified Hudson job: ${JOB}"
|
|
curl https://${{ secrets.HUDSON_JOB_USERNAME }}:${{ secrets.HUDSON_JOB_PASSWORD}}@hudson.sapsailing.com/job/${JOB}/build?token=${{ secrets.HUDSON_JOB_TOKEN }}
|