Merge pull request #300 from hdolinh/dev #681
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dispatcher | |
on: | |
push: | |
branches: ['**'] | |
pull_request: | |
types: [closed] | |
jobs: | |
dispatch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get pull request details | |
id: pr_details | |
uses: octokit/[email protected] | |
with: | |
route: GET /repos/:NCEAS/:nceas-training/pulls/:pull_number | |
pull_number: ${{ github.event.pull_request.number }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.RRCOURSE }} | |
- name: Set branch name to variable | |
run: | | |
branch=$(echo "${{ steps.pr_details.outputs.data.base.ref }}") | |
echo "BRANCH=$branch" >> $GITHUB_ENV | |
- name: Dispatch to RRC | |
run: | | |
curl -X POST -H "Authorization: token ${{ secrets.RRCOURSE }}" \ | |
-H "Content-Type: application/json" \ | |
-H "Accept: application/vnd.github.everest-preview+json" \ | |
--data '{"event_type": "quarto", "ref": "develop", \"branch\": \"$BRANCH\"}' | |
https://api.github.com/repos/nceas/repro-research-course/dispatches \ |