-
Notifications
You must be signed in to change notification settings - Fork 1k
93 lines (79 loc) · 2.9 KB
/
spider.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Spider
on:
workflow_dispatch:
#push:
#paths:
#- 'config/spider/config.json'
#- 'src/Spider/**'
#schedule:
#- cron: '0 1 1,15 * *'
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.100-preview.4.21255.9
# - name: Setup BuildXL
# uses: summpot/[email protected]
# - name: Setup Java JDK
# uses: actions/[email protected]
# with:
# java-version: 1.8
# java-package: jre
- name: Build spider
run: dotnet publish .\src\Spider\Spider.csproj -c Release -o ./ -r win-x64 -p:PublishSingleFile=true
- name: Run spider
run: .\Spider
# - name: Commit files
# run: |
# ri .\Spider.exe -Force
# git config http.sslVerify false
# git config user.name "github-actions[bot]"
# git config user.email "[email protected]"
# git pull origin HEAD:${{ github.ref }}
# git add .
# git commit -m "Update file"
# git push origin HEAD:${{ github.ref }}
- 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 report
run: |
$ErrorActionPreference ='Continue'
ri .\Formatter.exe -Force
ri .\Spider.exe -Force
git config --global user.name 'github-actions[bot]'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git add .
git commit -m "[Spider]Update file"
git push origin HEAD:${{ github.ref }}
shell: pwsh
# - name: Push changes
# 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 .\Spider.exe -Force
# $ErrorActionPreference ='Continue'
# git config --global credential.helper manager
# git config --global user.email "[email protected]"
# 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 "Update file"
# git push origin HEAD:${{ github.ref }}