-
-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (38 loc) · 1.15 KB
/
external-sync.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
name: External Sync
on:
schedule:
# This is mostly a no-op which is why it runs so often
- cron: '*/15 * * * *'
workflow_dispatch:
jobs:
external-sync:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Git user
run: |
set -eux
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11.0"
- name: Upgrade pip
run: python -m pip install -U pip
- name: Install dependencies
run: python -m pip install -r scripts/requirements.txt
- name: Sync data from external sources
run: ./ci/externalsync.sh
- name: Check for early exit
run: |
set -eux
if [[ `git rev-list --count HEAD ^main` == 0 ]]; then
exit 0
fi
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.PAT_TOKEN }}
branch: ${{ github.ref }}