-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) 路 1.08 KB
/
Copy pathauto_migrate.yml
File metadata and controls
42 lines (35 loc) 路 1.08 KB
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
42
name: Auto-Migrate CDB Texts
on:
schedule:
# Run every 6 hours
- cron: "0 */6 * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
auto-migrate:
runs-on: ubuntu-latest
steps:
- name: Checkout cdbespa-alternativo
uses: actions/checkout@v4
with:
ref: auto-migrate
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install git
run: sudo apt-get update && sudo apt-get install -y git
- name: Run auto-migrator
env:
GITHUB_TOKEN: ${{ secrets.STATS_TOKEN }}
REPO_DIR: "."
run: python cdbtext_auto_migrator.py
- name: Commit and push changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
git diff --staged --quiet || git commit -m "馃攧 Auto-migrate CDB texts from source repos [skip ci]"
git push origin auto-migrate