|
| 1 | +name: Update dependencies - bids-matlab, dic2nii, etc. |
| 2 | + |
| 3 | +concurrency: |
| 4 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 5 | + cancel-in-progress: true |
| 6 | + |
| 7 | +run-name: ${{ github.actor }} is updating dependencies |
| 8 | + |
| 9 | +on: |
| 10 | + schedule: |
| 11 | + - cron: 0 0 * * 1 # Every monday |
| 12 | + workflow_dispatch: |
| 13 | + |
| 14 | +jobs: |
| 15 | + update-dependencies: |
| 16 | + runs-on: ubuntu-latest |
| 17 | + steps: |
| 18 | + - name: Checkout gannet repo |
| 19 | + uses: actions/checkout@v5 |
| 20 | + |
| 21 | + - name: Checkout bids-matlab repo |
| 22 | + uses: actions/checkout@v5 |
| 23 | + with: |
| 24 | + repository: bids-standard/bids-matlab |
| 25 | + path: bids-matlab_tmp/ |
| 26 | + |
| 27 | + - name: Checkout dicm2nii repo |
| 28 | + uses: actions/checkout@v5 |
| 29 | + with: |
| 30 | + repository: xiangruili/dicm2nii |
| 31 | + path: dicm2nii_tmp/ |
| 32 | + |
| 33 | + - name: Checkout export_fig repo |
| 34 | + uses: actions/checkout@v5 |
| 35 | + with: |
| 36 | + repository: altmany/export_fig |
| 37 | + path: export_fig_tmp/ |
| 38 | + |
| 39 | + - name: Copy files from separate repos to current repo |
| 40 | + run: | |
| 41 | + rsync -av --exclude '.git' bids-matlab_tmp/ bids-matlab/ |
| 42 | + rsync -av --exclude '.git' dicm2nii_tmp/ dicm2nii/ |
| 43 | + rsync -av --exclude '.git' --exclude '.ignore' export_fig_tmp/ export_fig/ |
| 44 | + rm -rf bids-matlab_tmp/ dicm2nii_tmp/ export_fig_tmp/ |
| 45 | +
|
| 46 | + - name: Create pull request |
| 47 | + uses: peter-evans/create-pull-request@v7 |
| 48 | + with: |
| 49 | + commit-message: Sync with dependencies repos |
| 50 | + assignees: markmikkelsen |
| 51 | + base: main |
| 52 | + delete-branch: true |
| 53 | + title: '[BOT] Update dependencies - bids-matlab, dic2nii, etc.' |
| 54 | + body: Done by a [GitHub Action](https://github.com/markmikkelsen/Gannet/blob/main/.github/workflows/update_dependencies.yml) |
0 commit comments