|
5 | 5 | branches: [develop] |
6 | 6 | types: [closed] |
7 | 7 | jobs: |
8 | | - CanDIG-dispatch: |
| 8 | + CanDIGv2-dispatch: |
9 | 9 | runs-on: ubuntu-latest |
10 | 10 | env: |
11 | 11 | PARENT_REPOSITORY: CanDIG/CanDIGv2 |
|
41 | 41 | pr_description: "PR triggered by update to develop branch on ${{ github.repository }}. Commit hash: `${{ github.sha }}`. PR link: [#${{ env.PR_NUMBER }}](https://github.com/${{ github.repository }}/pull/${{ env.PR_NUMBER }})" |
42 | 42 | owner: ${{ env.OWNER }} |
43 | 43 | submodule_path: lib/htsget/htsget_app |
| 44 | + CanDIGv3-dispatch: |
| 45 | + runs-on: ubuntu-latest |
| 46 | + env: |
| 47 | + PARENT_REPOSITORY: CanDIG/CanDIGv3 |
| 48 | + CHECKOUT_BRANCH: develop |
| 49 | + PR_AGAINST_BRANCH: develop |
| 50 | + OWNER: CanDIG |
| 51 | + if: github.event.pull_request.merged == true |
| 52 | + steps: |
| 53 | + - name: Check out repository code |
| 54 | + uses: actions/checkout@v4 |
| 55 | + - name: get PR data |
| 56 | + shell: python |
| 57 | + run: | |
| 58 | + import json |
| 59 | + import os |
| 60 | + with open('${{ github.event_path }}') as fh: |
| 61 | + event = json.load(fh) |
| 62 | + escaped = event['pull_request']['title'].replace("'", '"') |
| 63 | + pr_number = event["number"] |
| 64 | + print(escaped) |
| 65 | + with open(os.environ['GITHUB_ENV'], 'a') as fh: |
| 66 | + print(f'PR_TITLE={escaped}', file=fh) |
| 67 | + print(f'PR_NUMBER={pr_number}', file=fh) |
| 68 | + - name: Create PR in CanDIGv3 |
| 69 | + id: make_pr |
| 70 | + uses: CanDIG/github-action-pr-expanded@v4 |
| 71 | + with: |
| 72 | + github_token: ${{ secrets.SUBMODULE_PR }} |
| 73 | + parent_repository: ${{ env.PARENT_REPOSITORY }} |
| 74 | + checkout_branch: ${{ env.CHECKOUT_BRANCH}} |
| 75 | + pr_against_branch: ${{ env.PR_AGAINST_BRANCH }} |
| 76 | + pr_title: "${{ github.repository }} merging: ${{ env.PR_TITLE }}" |
| 77 | + pr_description: "PR triggered by update to develop branch on ${{ github.repository }}. Commit hash: `${{ github.sha }}`. PR link: [#${{ env.PR_NUMBER }}](https://github.com/${{ github.repository }}/pull/${{ env.PR_NUMBER }})" |
| 78 | + owner: ${{ env.OWNER }} |
| 79 | + submodule_path: lib/htsget/htsget_app |
0 commit comments