forked from Cats-Team/AdRules
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.54 KB
/
desize.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
name: desize
on:
workflow_dispatch:
jobs:
clean:
runs-on: ubuntu-latest
steps:
- name: Clone repo
run: git clone --mirror https://cats-team:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} repo_gh
- name: Clean up
run: |
curl -fsSL -o bfg.jar https://repo1.maven.org/maven2/com/madgag/bfg/1.14.0/bfg-1.14.0.jar && \
java -jar bfg.jar --strip-blobs-bigger-than 10K -fs 100M repo_gh && \
cd repo_gh && \
git reflog expire --expire=now --all && \
git gc --prune=now --aggressive
- name: Push
run: |
cd repo_gh
git show-ref | cut -d' ' -f2 | grep 'pull' | xargs -r -L1 git update-ref -d
git push origin --force
cd ../
rm -rf repo_gh
#Gitlab
- name: Clone repo
run: git clone --mirror https://cats-team:${{ secrets.GITLAB_TOKEN }}@gitlab.com/cats-team/adrules.git repo_gh
- name: Clean up
run: |
curl -fsSL -o bfg.jar https://repo1.maven.org/maven2/com/madgag/bfg/1.14.0/bfg-1.14.0.jar && \
java -jar bfg.jar --strip-blobs-bigger-than 10K -fs 100M repo_gh && \
cd repo_gh && \
git reflog expire --expire=now --all && \
git gc --prune=now --aggressive
- name: Push
run: |
cd repo_gh
git show-ref | cut -d' ' -f2 | grep 'pull' | xargs -r -L1 git update-ref -d
git push origin --force
cd ../
rm -rf repo_gh