Skip to content

Trigger remote repository jobs #4

Trigger remote repository jobs

Trigger remote repository jobs #4

Workflow file for this run

# Create a dispatch event to trigger workflows in associated repos
on:
workflow_dispatch:
push: # Trigger event on new tagged versions
tags: [v*]
jobs:
dispatch:
runs-on: ubuntu-latest
steps:
- name: Get latest release tag
run: |
echo "LATEST_TAG=$(echo `git describe --tags $(git rev-list --tags --max-count=1)`)" >> $GITHUB_ENV
- name: Create dispatch event for autobids-docs
uses: actions/github-script@v6
with:
github-token: ${{ secrets.BP_PAT_TOKEN }}
script: |
const result = await github.rest.repos.createDispatchEvent({
owner: 'khanlab',
repo: 'autobids-docs',
event_type: 'autobidsportal_release'
client_payload:{"version": "${{ env.LATEST_TAG }}"}
})
console.log(result);
- name: Create dispatch event for autobids-globus
uses: actions/github-script@v6
with:
github-token: ${{ secrets.BP_PAT_TOKEN }}
script: |
const result = await github.rest.repos.createDispatchEvent({
owner: 'khanlab',
repo: 'autobids-globus',
event_type: 'autobidsportal_release'
client_payload:{"version": "${{ env.LATEST_TAG }}"}
})
console.log(result);