Skip to content

Commit 5a93f57

Browse files
committed
Add workflows to sync dicm2nii and export_fig repos
Introduces two GitHub Actions workflows to automatically sync the dicm2nii and export_fig repositories into the current repo every Monday or on manual dispatch. Each workflow checks out the respective external repo, copies its contents, and creates a pull request for integration.
1 parent babebf0 commit 5a93f57

File tree

2 files changed

+82
-0
lines changed

2 files changed

+82
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Update dicm2nii
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
run-name: ${{ github.actor }} is updating dicm2nii
8+
9+
on:
10+
schedule:
11+
- cron: 0 0 * * 1 # Every monday
12+
workflow_dispatch:
13+
14+
jobs:
15+
update-dicm2nii:
16+
if: github.repository_owner == 'xiangruili'
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout gannet repo
20+
uses: actions/checkout@v3
21+
22+
- name: Checkout dicm2nii repo
23+
uses: actions/checkout@v3
24+
with:
25+
repository: xiangruili/dicm2nii
26+
path: dicm2nii_tmp/
27+
28+
- name: Copy files from separate repo to current repo
29+
run: |
30+
rsync -av --exclude '.git' dicm2nii_tmp/ dicm2nii/
31+
rm -rf dicm2nii_tmp/
32+
33+
- name: Create pull request
34+
uses: peter-evans/create-pull-request@v7
35+
with:
36+
commit-message: Sync with xiangruili/dicm2nii repo
37+
assignees: markmikkelsen
38+
base: main
39+
delete-branch: true
40+
title: '[BOT] update dicm2nii'
41+
body: Done by a [GitHub Action](https://github.com/bids-standard/bids-matlab/blob/main/.github/workflows/update_dicm2nii.yml)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Update export_fig
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
run-name: ${{ github.actor }} is updating export_fig
8+
9+
on:
10+
schedule:
11+
- cron: 0 0 * * 1 # Every monday
12+
workflow_dispatch:
13+
14+
jobs:
15+
update-export_fig:
16+
if: github.repository_owner == 'altmany'
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout gannet repo
20+
uses: actions/checkout@v3
21+
22+
- name: Checkout export_fig repo
23+
uses: actions/checkout@v3
24+
with:
25+
repository: altmany/export_fig
26+
path: export_fig_tmp/
27+
28+
- name: Copy files from separate repo to current repo
29+
run: |
30+
rsync -av --exclude '.git' export_fig_tmp/ export_fig/
31+
rm -rf export_fig_tmp/
32+
33+
- name: Create pull request
34+
uses: peter-evans/create-pull-request@v7
35+
with:
36+
commit-message: Sync with altmany/export_fig repo
37+
assignees: markmikkelsen
38+
base: main
39+
delete-branch: true
40+
title: '[BOT] update export_fig'
41+
body: Done by a [GitHub Action](https://github.com/bids-standard/bids-matlab/blob/main/.github/workflows/update_export_fig.yml)

0 commit comments

Comments
 (0)