Skip to content

fix workflow concurency (#4) #12

fix workflow concurency (#4)

fix workflow concurency (#4) #12

Workflow file for this run

name: Trigger Target Workflow
on:
workflow_dispatch:
push:
branches:
- master
jobs:
trigger:
name: Trigger Webhook
runs-on: ubuntu-latest
steps:
- name: Trigger Webhook
env:
repo_owner: "biosustain"
repo_name: "lifelike-infrastructure"
run: |
load=$(
cat<<EOF | jq
{
"event_type": "Source code update",
"client_payload": {
"caller": "${{ github.workflow }}",
"repository": "${{ github.repository }}",
"run_id": "${{ github.run_id }}"
}
}
EOF
)
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.WEBHOOK_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/$repo_owner/$repo_name/dispatches \
-d "$load"
link="[$repo_owner/$repo_name](https://github.com/$repo_owner/$repo_name/actions)"
echo "Triggered webhook on $link" | tee $GITHUB_STEP_SUMMARY