Compare commits

...

9 Commits
v1.1 ... master

Author SHA1 Message Date
Vitalii Mikhailov 9e891dc585
Update action.yml 6 months ago
Vitalii Mikhailov b6f0ebce50
Update action.yml 2 years ago
Vitalii Mikhailov 02f4ec9f44
Update action.yml 2 years ago
Vitaly Mikhailov f7c88aebe0
Update action.yml 4 years ago
Vitaly Mikhailov 8b13d5e5fd
Update action.yml 4 years ago
Vitaly Mikhailov fc8fef6e56
Update action.yml 4 years ago
Vitaly Mikhailov 8674cdf4c8
Update action.yml 4 years ago
Vitaly Mikhailov e39095baa1
Update action.yml 4 years ago
Vitaly Mikhailov 167fbfa71c
Update action.yml 4 years ago

@ -1,4 +1,4 @@
name: "Code Formatting Setup"
name: "Code Formatting"
description: ""
inputs:
workspace:
@ -7,21 +7,28 @@ inputs:
github-token:
description: ''
default: ''
assignees:
description: ''
default: 'aragas, artifixer'
reviewers:
description: ''
default: 'aragas, artifixer'
runs:
using: "composite"
steps:
- name: Setup
uses: butr/actions-common-setup@v1.2
uses: butr/actions-common-setup@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}
github-token: ${{ inputs.github-token }}
- name: Install dotnet-format
run: dotnet tool install -g dotnet-format
shell: pwsh
- name: Run dotnet format
id: format
uses: jfversluis/dotnet-format@v1.0.7
uses: jfversluis/dotnet-format@v1.0.9
with:
repo-token: ${{ inputs.github-token }}
action: "fix"
@ -31,9 +38,9 @@ runs:
- name: Commit files
run: >-
if ('${{ steps.format.outputs.has-changes == 'true' }}' -eq '') { Return };
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -a -m 'Automated dotnet-format update'
git config --local user.name "github-actions[bot]";
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com";
git diff-index --quiet HEAD || git commit -a -m 'Automated dotnet-format update';
shell: pwsh
- name: Create Pull Request
@ -45,18 +52,20 @@ runs:
committer: GitHub <noreply@github.com>
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
labels: code-formatting
assignees: aragas, artifixer, zijistark
reviewers: aragas, artifixer, zijistark
assignees: ${{ inputs.assignees }}
reviewers: ${{ inputs.reviewers }}
branch: code-formatting/fix-codeformatting
delete-branch: true
# Pushing won't work to forked repos
# - name: Commit files
# if: steps.format.outputs.has-changes == 'true'
# run: |
# git config --local user.name "github-actions[bot]"
# git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
# git commit -a -m 'Automated dotnet-format update
# run: >-
# git config --local user.name "github-actions[bot]";
# git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com";
# git commit -a -m 'Automated dotnet-format update;
# Co-authored-by: ${{ github.event.pull_request.user.login }} <${{ github.event.pull_request.user.id }}+${{ github.event.pull_request.user.login }}@users.noreply.github.com>'
# shell: pwsh
# - name: Push changes
# if: steps.format.outputs.has-changes == 'true'

Loading…
Cancel
Save