File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Sync T26 DBC Files
2+
3+ on :
4+ # Allows manual execution from GitHub Actions
5+ workflow_dispatch :
6+
7+ # Check every 30 minutes
8+ schedule :
9+ - cron : " */30 * * * *"
10+
11+ permissions :
12+ contents : write
13+
14+ jobs :
15+ sync-dbc :
16+ runs-on : ubuntu-latest
17+
18+ steps :
19+ - name : Checkout destination repository
20+ uses : actions/checkout@v4
21+
22+ - name : Download T26 DBC files
23+ run : |
24+ mkdir -p dbc_signals
25+
26+ BASE_URL="https://raw.githubusercontent.com/FSLART/T26_DBC/main"
27+
28+ curl -fsSL "$BASE_URL/data_t26.dbc" \
29+ -o dbc_signals/data_t26.dbc
30+
31+ curl -fsSL "$BASE_URL/autonomous_t26.dbc" \
32+ -o dbc_signals/autonomous_t26.dbc
33+
34+ curl -fsSL "$BASE_URL/powertrain_t26.dbc" \
35+ -o dbc_signals/powertrain_t26.dbc
36+
37+ - name : Check for changes
38+ id : changes
39+ run : |
40+ if git diff --quiet -- dbc_signals/; then
41+ echo "changed=false" >> "$GITHUB_OUTPUT"
42+ else
43+ echo "changed=true" >> "$GITHUB_OUTPUT"
44+ fi
45+
46+ - name : Commit and push changes
47+ if : steps.changes.outputs.changed == 'true'
48+ run : |
49+ git config user.name "github-actions[bot]"
50+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
51+
52+ git add dbc_signals/
53+
54+ git commit -m "chore: update T26 DBC files"
55+ git push
You can’t perform that action at this time.
0 commit comments