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 : Template Update
2+
3+ permissions :
4+ contents : read
5+
6+ on :
7+ schedule :
8+ - cron : ' 1 1 1 * *'
9+ workflow_dispatch :
10+
11+ env :
12+ RUST_BACKTRACE : 1
13+ CARGO_TERM_COLOR : always
14+ CLICOLOR : 1
15+ TEMPLATE_URL : " https://github.com/epage/_rust.git"
16+ TEMPLATE_BRANCH : " main"
17+
18+ concurrency :
19+ group : " ${{ github.workflow }}-${{ github.ref }}"
20+ cancel-in-progress : true
21+
22+ jobs :
23+ update :
24+ permissions :
25+ security-events : write # to create PR
26+ runs-on : ubuntu-latest
27+ steps :
28+ - name : Checkout repository
29+ uses : actions/checkout@v4
30+ with :
31+ fetch-depth : 0
32+ - name : Configure git
33+ run : |
34+ git config --global user.name '${{ github.actor }}'
35+ git config --global user.email '<>'
36+ - name : Fetch template
37+ run : " git remote add template ${{ env.TEMPLATE_URL }} && git fetch template ${{ env.TEMPLATE_BRANCH }}"
38+ - name : Merge template
39+ run : " git checkout -b template-update && git merge template/${{ env.TEMPLATE_BRANCH }} -m 'chore: Update from template'"
40+ - name : Push branch
41+ run : " git push -f"
42+ env :
43+ GH_TOKEN : ${{ github.token }}
44+ - name : Create PR
45+ run : " gh pr create -H template-update -t 'chore: Update from template'"
46+ env :
47+ GH_TOKEN : ${{ github.token }}
You can’t perform that action at this time.
0 commit comments