This repository was archived by the owner on Aug 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed
Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Remove Images
2+
3+ on :
4+ push :
5+ paths :
6+ - ' .github/workflows/remove_images.yml'
7+
8+ jobs :
9+ remove_images :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Set up Python
14+ uses : actions/setup-python@v2
15+ with :
16+ python-version : 3.8
17+ - name : Install git-filter-repo
18+ shell : bash -xe {0}
19+ run : |
20+ pip install -U pip setuptools wheel
21+ pip install git-filter-repo
22+ - name : Run git-filter-repo
23+ env :
24+ REPO_URL : https://github.com/intel/dffml
25+ BRANCH : master
26+ GIT_FILTER_REPO_PATHS : /tmp/git-filter-repo-paths
27+ shell : bash -xe {0}
28+ run : |
29+ git init
30+ git remote add origin $REPO_URL
31+ git fetch origin $BRANCH
32+ git reset --hard origin/$BRANCH
33+ git log -n 3 --oneline
34+ git log --stat $BRANCH | grep -E '\.png|\.jpeg|\.jpg|\.gif'
35+ cat > $GIT_FILTER_REPO_PATHS <<'EOF'
36+ glob:*.gif
37+ glob:*.png
38+ glob:*.jpg
39+ glob:*.jpeg
40+ EOF
41+ git filter-repo --force --invert-paths --paths-from-file $GIT_FILTER_REPO_PATHS
42+ git diff --stat origin/$BRANCH
43+ git log --stat $BRANCH | grep -E '\.png|\.jpeg|\.jpg|\.gif'
44+ git branch
45+ - name : Push
46+ env :
47+ BRANCH : main
48+ shell : bash -xe {0}
49+ run : |
50+ git checkout -b $BRANCH
51+ git push -u origin $BRANCH
You can’t perform that action at this time.
0 commit comments