-
Notifications
You must be signed in to change notification settings - Fork 13
40 lines (32 loc) · 940 Bytes
/
rust.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
name: Rust Filter and Push
on:
schedule:
- cron: '0 */4 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN }}
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build
run: cargo build --release
- name: Run
run: cargo run
- name: Calculate Domain Changes
run: echo "DOMAIN_CHANGES=$(git diff --shortstat phishing-sites-list.json | awk '{print $4}')" >> $GITHUB_ENV
- name: Commit and Push
run: |
if [[ $DOMAIN_CHANGES -gt 5 ]]; then
git config --local user.email "[email protected]"
git config --local user.name "codeesura"
git add .
git commit -m "Add-remove filtered domains" || echo "No changes to commit"
git push
fi