File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ name: Regenerate target info
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 target info & 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-target-info/${{ github.run_id }}
20
+
21
+ - name: Install rust
22
+ run: |
23
+ rustup toolchain install stable --no-self-update --profile minimal
24
+
25
+ - name: Regenerate target info
26
+ run: cargo run --bin gen-target-info
27
+
28
+ - name: Detect changes
29
+ id: changes
30
+ run:
31
+ # This output boolean tells us if the dependencies have actually changed
32
+ echo "count=$(git status --porcelain=v1 | wc -l)" >> $GITHUB_OUTPUT
33
+
34
+ - name: Commit and push changes
35
+ # Only push if changes exist
36
+ if: steps.changes.outputs.count > 0
37
+ run: |
38
+ git config user.name github-actions
39
+ git config user.email
[email protected]
40
+ git commit -am "dep: Regenerate target info"
41
+ git push origin HEAD
42
+
43
+ - name: Open pull request if needed
44
+ if: steps.changes.outputs.count > 0
45
+ env:
46
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47
+ run: |
48
+ gh pr create --base main --fill
You can’t perform that action at this time.
0 commit comments