-
Notifications
You must be signed in to change notification settings - Fork 2
134 lines (104 loc) · 4.22 KB
/
exodusscan.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# This is a basic workflow to help you get started with Actions
name: exodus-privacy scan
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
pull_request:
branches-ignore: [main]
schedule:
- cron: "5 7 * * */3" # at 07:05AM (UTC) on every 3rd day-of-week
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
repository_dispatch: # run workflow on api request
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: clone this repo
run: git clone https://github.com/$GITHUB_REPOSITORY TinyWeatherForecastGermanyScan
- name: clone remote repo
run: |
git clone https://github.com/twfgcicdbot/TinyWeatherForecastGermanyMirror TinyWeatherForecastGermanyMirror || true
- name: update packages
run: timeout 120s sudo apt update || true
- name: upgrade packages
run: timeout 120s sudo apt upgrade -y || true
- name: Setup Python 3.11.x
uses: actions/setup-python@v5
with:
python-version: 3.11.8
- name: upgrade pip
run: python -m pip install --upgrade pip wheel setuptools
- name: install dexdump, ripgrep and apktool
run: sudo apt install -y dexdump ripgrep apktool brotli
- name: install virtualenv
run: pip install virtualenv
- name: list directory contents
run: ls -lisha
- name: init virtualenv
run: virtualenv venv
- name: activate virtualenv
run: source venv/bin/activate
- name: list directory contents
run: ls -lisha
- name: install python requirements
run: pip install -r TinyWeatherForecastGermanyScan/requirements.txt
- name: run __init__.py
run: python TinyWeatherForecastGermanyScan/__init__.py
- name: run rg-pattern-search.py
run: python TinyWeatherForecastGermanyScan/rg-pattern-search.py || true
- name: run logtohtml.py
run: python TinyWeatherForecastGermanyScan/logtohtml.py || true
- name: list directory contents
run: ls -lisha
- name: list directory contents of TinyWeatherForecastGermanyScan
run: cd TinyWeatherForecastGermanyScan && ls -lisha
- name: return directory size
run: du -sh
- name: Archive analysis report and tracker signatures
uses: actions/upload-artifact@v4
with:
name: reports-and-tracker-signatures
path: |
*/*.json
*/*.md
*/*.html
retention-days: 5
- name: Archive analysed apk
uses: actions/upload-artifact@v4
with:
name: analysed-apk
path: |
*/*.apk
retention-days: 5
- name: list directory contents of TinyWeatherForecastGermanyScan
run: cd TinyWeatherForecastGermanyScan && ls -lisha
# also see here: https://github.community/t/support-for-pre-compressed-assets-and-brotli-compression/10605
#- name: compress assets using gzip and brotli
# run: |
# gzip -k -6 $(find TinyWeatherForecastGermanyScan -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$') || true
# find TinyWeatherForecastGermanyScan -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec brotli -f -k {} \; || true
# - name: list directory contents of TinyWeatherForecastGermanyScan
# run: cd TinyWeatherForecastGermanyScan && ls -lisha
- name: git push to origin
run: |
cd TinyWeatherForecastGermanyScan
git config --global user.name 'twfgcicdbot'
git config --global user.email 'twfgcicdbot@outlook.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git fetch --all
git checkout --orphan 'gh-pages'
git reset
git add *.json
git add *.md
git add *.html
git add *.css
git add BingSiteAuth.xml || true
git add images/ || true
git add sitemap.xml || true
git add robots.txt || true
git status
git commit -m "update github pages"
git push -f origin gh-pages