2024-10-23 13:22:41 +00:00
|
|
|
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: "https://github.com/epage/_rust.git"
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: "${{ github.workflow }}-${{ github.ref }}"
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
update:
|
2024-10-23 13:23:51 +00:00
|
|
|
permissions:
|
|
|
|
security-events: write # to create PR
|
2024-10-23 13:24:56 +00:00
|
|
|
runs-on: ubuntu-latest
|
2024-10-23 13:22:41 +00:00
|
|
|
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"
|