Add the autoformat actions to autoformat the code in this repo. (#105)
This commit is contained in:
Родитель
7e8233fc97
Коммит
5e7f841b6f
|
@ -0,0 +1,23 @@
|
|||
name: Autoformat code - push results
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Autoformat code"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
push-and-notify:
|
||||
name: Push autoformatted code and notify user
|
||||
runs-on: ubuntu-latest
|
||||
if: >
|
||||
github.event.workflow_run.event == 'pull_request' &&
|
||||
github.event.workflow_run.conclusion == 'success'
|
||||
steps:
|
||||
- name: 'Push autoformatted patch'
|
||||
uses: rolfbjarne/autoformat-push@v0.1
|
||||
with:
|
||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -0,0 +1,17 @@
|
|||
name: Autoformat code
|
||||
on: pull_request
|
||||
|
||||
# This action only need a single permission in order to autoformat the code.
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
autoformat-code:
|
||||
name: Autoformat code
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 'Autoformat'
|
||||
uses: rolfbjarne/autoformat@v0.1
|
||||
with:
|
||||
projects: "Xamarin.MacDev.sln"
|
Загрузка…
Ссылка в новой задаче