.github/workflows/biosim-release.yml
name: Trigger Docker image rebuild in biosimulators/Biosimulators_GillesPy2
on:
release:
types: [published]
jobs:
release:
name: Biosimulator Rebuild
runs-on: ubuntu-latest
env:
DOWNSTREAM_REPOSITORY: biosimulators/Biosimulators_GillesPy2
DOWNSTREAM_REF: refs/heads/dev
GH_ISSUE_USERNAME: ${{ secrets.GH_ISSUE_USERNAME }}
GH_ISSUE_TOKEN: ${{ secrets.GH_ISSUE_TOKEN }}
steps:
- name: Trigger GitHub workflow on Biosimulator repo to rebuild
run: |
PACKAGE_VERSION="${GITHUB_REF#refs/tags/v}"
WORKFLOW_FILE="ci.yml"
curl \
-X POST \
-u "${GH_ISSUE_USERNAME}:${GH_ISSUE_TOKEN}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${DOWNSTREAM_REPOSITORY}/actions/workflows/${WORKFLOW_FILE}/dispatches \
-d "{\"inputs\": {\"simulatorVersion\": \"${PACKAGE_VERSION}\", \"simulatorVersionLatest\": \"true\"}, \"ref\": \"${DOWNSTREAM_REF}\"}"