-
Notifications
You must be signed in to change notification settings - Fork 52
64 lines (51 loc) · 1.55 KB
/
main.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
name: btblocklist
on:
push:
branches:
- master
schedule:
- cron: "0 0 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: initialize
run: |
git config user.name github-actions
git config user.email [email protected]
- name: remove binary files from history (reduce the repo size)
run: |
git filter-branch --force --index-filter "git rm --cached --ignore-unmatch bt_blocklists.gz" --prune-empty --tag-name-filter cat -- --all
rm -rf .git/refs/original/
git reflog expire --expire=now --all
git gc --prune=now
git gc --aggressive --prune=now
# - name: download from mirror.codebucket.de
# run: |
# wget https://mirror.codebucket.de/transmission/blocklist.p2p.gz -O bt_blocklists.gz
- name: Run build script
run: |
chmod +x ./update.sh
./update.sh
shell: bash
- name: Push
run: |
git add .
git commit -m "auto update"
git push origin --force --all
du -sh .git
- name: Delete the old release
uses: dev-drprasad/delete-tag-and-release@master
with:
delete_release: true
tag_name: master
repo: Naunter/BT_BlockLists
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push the new release
uses: softprops/action-gh-release@v1
with:
name: bt_blocklists
tag_name: v.1
files: bt_blocklists.gz