forked from clap-rs/clap
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (30 loc) · 885 Bytes
/
template.yml
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
name: Template Update
permissions:
contents: read
on:
schedule:
- cron: '1 1 1 * *'
workflow_dispatch:
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CLICOLOR: 1
TEMPLATE_URL: "https://github.com/epage/_rust.git"
TEMPLATE_BRANCH: "main"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
update:
permissions:
security-events: write # to create PR
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Fetch template
run: "git remote add template ${{ env.TEMPLATE_URL }} && git fetch template ${{ env.TEMPLATE_BRANCH }}"
- name: Merge template
run: "git checkout -b template-update && git merge template/${{ env.TEMPLATE_BRANCH }} -m 'chore: Update from template'"
- name: Push
run: "gh pr create -H template-update"