This repository has been archived by the owner on Jan 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (66 loc) · 2.38 KB
/
formatter.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Formatter
on:
workflow_dispatch:
schedule:
- cron: '0 9 1,15 * *'
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Build formatter
run: dotnet publish .\src\Formatter\Formatter.csproj -c Release -o ./ -r win-x64 -p:PublishSingleFile=true
- name: Run formatter
run: .\Formatter
# - name: Commit files
# run: |
# ri .\Formatter.exe -Force
# git config http.sslVerify false
# git config user.name "github-actions[bot]"
# git config user.email "actions@users.noreply.github.com"
# git pull origin HEAD:${{ github.ref }}
# git add .
# git commit -m "Update file"
# git push origin HEAD:${{ github.ref }}
- name: Commit report
run: |
$ErrorActionPreference ='Continue'
ri .\Formatter.exe -Force
git config --global user.name 'github-actions[bot]'
git config --global user.email 'actions@users.noreply.github.com'
git add .
git commit -m "[Formatter]Update file"
shell: pwsh
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
# - name: Push changes
# git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
# git config --local user.name "github-actions[bot]"
# uses: ad-m/github-push-action@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# branch: ${{ github.ref }}
# - name: Push to github
# if: ${{github.event}} == 'push'
# run: |
# ri .\Formatter.exe -Force
# $ErrorActionPreference ='Continue'
# git config --global credential.helper manager
# git config --global user.email "fanng233@gmail.com"
# git config --global user.name "CfpaBot"
# @"
# protocol=https
# host=github.com
# username=baka-gourd
# password=${{secrets.BAKA_GOURD_TOKEN}}
# "@ > .\1.txt
# gc 1.txt|git credential-manager store
# ri .\1.txt -Force
# git add .
# git commit -m "Format file"
# git push origin HEAD:${{ github.ref }}