1
0
Fork 0

Change runner to github

This commit is contained in:
Spirillen 2023-08-30 21:00:49 +02:00
parent 139533277f
commit 9242d0ff61
No known key found for this signature in database
GPG Key ID: 88CC3F27732845AD
2 changed files with 13 additions and 19 deletions

View File

@ -23,7 +23,7 @@ jobs:
fail-fast: false
matrix:
python_version:
- '3.10'
- '3.11'
os:
- ubuntu-22.04
@ -39,20 +39,24 @@ jobs:
with:
python-version: ${{ matrix.python_version }}
- name: Get latest FOP
run: wget -O FOP.py "https://raw.githubusercontent.com/easylist/easylist/master/FOP.py"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install --no-cache -I -r requirements.txt; fi
- name: Render the rules
- name: Install hostlist-compiler
run: |
BUILD="$(git rev-parse --short HEAD)"
flrender -v -i ublockorigin-rules=. adblocker-rules.template _public/blockrules.txt
sed -i -e "s/\! BuildID:/\! BuildID: $BUILD/g" _public/blockrules.txt
head -n 5 _public/blockrules.txt
npm i -g @adguard/hostlist-compiler
hostlist-compiler -c tools/hostscompilerconf.json
-o _public/blockrules.txt
hostlist-compiler -c tools/noise.json -o _public/noise.txt
# - name: Render the rules
# run: |
# BUILD="$(git rev-parse --short HEAD)"
# flrender -v -i ublockorigin-rules=. adblocker-rules.template _public/blockrules.txt
# sed -i -e "s/\! BuildID:/\! BuildID: $BUILD/g" _public/blockrules.txt
# head -n 5 _public/blockrules.txt
- name: Deploy
run: |

View File

@ -6,16 +6,6 @@ variables:
PIP_CACHE_DIR: '$CI_PROJECT_DIR/.cache/pip'
GIT_STRATEGY: clone
# https://about.gitlab.com/blog/2022/09/12/a-visual-guide-to-gitlab-ci-caching/#local-cache-docker-volume
# We can use file names as keys as well https://docs.gitlab.com/ee/ci/yaml/index.html#cachekeyfiles
# default:
# cache:
# key: $CI_COMMIT_REF_NAME
# key:
# files:
# - blockrules.txt
# - noise.txt
cache:
key: $CI_COMMIT_SHORT_SHA
paths: