Rework CI
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
name: Auto-merge updates
|
||||
on: pull_request
|
||||
permissions:
|
||||
contents: write
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
auto-merge-updates:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.actor == 'monosans' && startsWith(github.head_ref, 'update/') }}
|
||||
steps:
|
||||
- run: gh pr merge --auto --delete-branch --squash "${PR_URL}"
|
||||
env:
|
||||
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -0,0 +1,16 @@
|
||||
name: CI
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
run-pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: pipx run pre-commit run --all-files
|
||||
@@ -0,0 +1,29 @@
|
||||
name: Update dependencies
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: 0 6 * * *
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
update-dependencies:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- cmd: pipx run pre-commit autoupdate
|
||||
commit-msg: Update .pre-commit-config.yaml
|
||||
branch: update/pre-commit-config
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: ${{ matrix.cmd }}
|
||||
- uses: peter-evans/create-pull-request@v5
|
||||
with:
|
||||
token: ${{ secrets.PAT }}
|
||||
commit-message: ${{ matrix.commit-msg }}
|
||||
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
||||
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
||||
branch: ${{ matrix.branch }}
|
||||
title: ${{ matrix.commit-msg }}
|
||||
body:
|
||||
Reference in New Issue
Block a user