-
Notifications
You must be signed in to change notification settings - Fork 362
41 lines (37 loc) · 1.3 KB
/
update-public-instances.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Update public instances
on:
# Delete push: and replace with schedule before merging to main
push:
branches:
- instance-picker
jobs:
run:
# Delete with: ref: instance-picker before merging to main
name: Update public instances
runs-on: ubuntu-latest
steps:
- name: Checkout matrix.org source
uses: actions/checkout@v4
with:
path: 'morg'
ref: instance-picker
- name: Checkout the public instance updater
uses: actions/checkout@v4
with:
repository: 'thibaultamartin/public-instances-updater'
path: 'piu'
- name: Update public instance data on the runner
run: |
cp morg/content/public-instances/instances.toml piu/instances.toml
cd piu && yarn && yarn run update && cd ..
cp piu/instances.toml morg/content/public-instances/instances.toml
# Delete the if before merging to main
- name: Commit and push data (scheduled)
if: github.event_name == 'schedule'
run: |
git config --global user.name "GitHub CI"
git config --global user.email "[email protected]"
git add content/public-instances/instances.toml
git commit -m "Update instances.toml"
git push
working-directory: morg