-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.11 KB
/
PDV-4.4智商检测.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
name: PDV智商检测
env:
REPO_URL: https://github.com/meisreallyba/padavan-4.4.git
REPO_BRANCH: main
on:
workflow_dispatch:
schedule:
- cron: 0 14 * * 6
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Get Commit Hash
id: getHash
run: |
git clone --depth 1 $REPO_URL -b $REPO_BRANCH .
echo "::set-output name=commitHash::$(git rev-parse HEAD)"
- name: Compare Commit Hash
id: cacheHash
uses: actions/cache@main
with:
path: .commitHash
key: HEAD-${{ steps.getHash.outputs.commitHash }}
- name: Save New Commit Hash
if: steps.cacheHash.outputs.cache-hit != 'true'
run: |
echo ${{ steps.getHash.outputs.commitHash }} | tee .commitHash
- name: Trigger build
if: steps.cacheHash.outputs.cache-hit != 'true'
uses: peter-evans/repository-dispatch@main
with:
token: ${{ secrets.PAT }}
event-type: Hanwckf Padavan Source Code Update
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@main
with:
retain_days: 1
keep_minimum_runs: 1