Skip to content

Trigger openshift-ci automation #9

Trigger openshift-ci automation

Trigger openshift-ci automation #9

name: Trigger openshift-ci automation
on:
create
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Test
run: |
export BRANCH=${{ github.event.ref }}
echo $BRANCH
# check if version starts with v or not
if [[ $BRANCH = v* ]];then
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.ACTIONS_KEY }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/kamuserbot/release/dispatches \
-d '{"event_type":"Trigger workflow for '"$BRANCH"'","client_payload":{"branch": "'"$BRANCH"'"}}'
echo "Request sent!"
else
echo "skipping Workflow activation"
fi