Skip to content

Commit 582d152

Browse files
committed
Add GitHub Actions workflow to sync export_fig
Introduces a workflow that checks out the export_fig repository, copies its contents into the local export_fig directory, and commits any changes. This automates keeping the export_fig code up to date with its upstream repository.
1 parent 7756f0e commit 582d152

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Update export_fig
2+
3+
run-name: ${{ github.actor }} is updating export_fig
4+
5+
on: [push]
6+
7+
jobs:
8+
update-export_fig:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout gannet repo
12+
uses: actions/checkout@v3
13+
14+
- name: Checkout export_fig repo
15+
uses: actions/checkout@v3
16+
with:
17+
repository: altmany/altmany/export_fig # Replace with the owner/repository name
18+
path: export_fig_tmp/
19+
20+
- name: Copy files from separate repo to current repo
21+
run: |
22+
rsync -av --exclude '.git' export_fig_tmp/ export_fig/
23+
rm -rf export_fig_tmp/
24+
25+
- name: Commit and push changes
26+
run: |
27+
git config markmikkelsen "GitHub Actions"
28+
29+
git add .
30+
git diff-index --quiet HEAD || git commit -m "Sync from export_fig repo"
31+
git push

0 commit comments

Comments
 (0)