File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ name: Regenerate windows sys bindings
2+
3+ on:
4+ workflow_dispatch: # Allow running on-demand
5+ schedule:
6+ - cron: '0 3 * * 5'
7+
8+ jobs:
9+ regenerate:
10+ name: Regenerate windows sys bindings & Open Pull Request if necessary
11+ runs-on: ubuntu-latest
12+ steps:
13+ - uses: actions/checkout@v4
14+ with:
15+ persist-credentials: true
16+
17+ - name: Generate branch name
18+ run: |
19+ git checkout -b regenerate-windows-sys-${{ github.run_id }}
20+
21+ - uses: Swatinem/rust-cache@v2
22+ - name: Regenerate windows sys bindings
23+ run: cargo run -p gen-windows-sys-binding
24+
25+ - name: Detect changes
26+ id: changes
27+ run:
28+ # This output boolean tells us if the dependencies have actually changed
29+ echo "count=$(git status --porcelain=v1 | wc -l)" >> $GITHUB_OUTPUT
30+
31+ - name: Commit and push changes
32+ # Only push if changes exist
33+ if: steps.changes.outputs.count > 0
34+ run: |
35+ git config user.name github-actions
36+ git config user.email github-actions@github.com
37+ git commit -am "Regenerate windows sys bindings"
38+ git push origin HEAD
39+
40+ - name: Open pull request if needed
41+ if: steps.changes.outputs.count > 0
42+ env:
43+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+ run: |
45+ gh pr create --base main --title "Regenerate windows sys bindings" --body "Automatically regenerated in CI"
You can’t perform that action at this time.
0 commit comments