Skip to content

Commit ea3bd80

Browse files
authored
Merge pull request #288 from T145/develop
[FIX] More workflow tweaks
2 parents 6fae25d + a63fdb6 commit ea3bd80

10 files changed

Lines changed: 22 additions & 55 deletions

File tree

.github/workflows/publish_docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Checkout repo
2020
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
2121
- name: Set up QEMU
22-
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
22+
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130
2323
- name: Set up Docker Buildx
2424
id: buildx
2525
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5

.github/workflows/publish_lists.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ jobs:
6666
if: always()
6767
run: rm -rf build/ && rm -f lists.tar
6868
upload_release:
69+
if: github.ref == 'refs/heads/master'
6970
runs-on: ubuntu-22.04
7071
needs: build_lists
7172
continue-on-error: true
@@ -87,7 +88,7 @@ jobs:
8788
cd ..
8889
# https://github.com/softprops/action-gh-release
8990
- name: Create release
90-
uses: softprops/action-gh-release@7b4da11513bf3f43f9999e90eabced41ab8bb048
91+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b
9192
with:
9293
files: build/*
9394
generate_release_notes: true
@@ -102,6 +103,7 @@ jobs:
102103
with:
103104
name: lists
104105
update_docs:
106+
if: github.ref == 'refs/heads/master'
105107
runs-on: ubuntu-22.04
106108
needs: upload_release
107109
permissions: write-all
@@ -123,7 +125,7 @@ jobs:
123125
- name: Make the working tree safe
124126
run: git config --global --add safe.directory /__w/black-mirror/black-mirror
125127
- name: Update documents
126-
uses: stefanzweifel/git-auto-commit-action@0b492c0d951b87f3cd12523a542dbd156c1dbc80
128+
uses: stefanzweifel/git-auto-commit-action@fc84150d7c7500bbbaedb7ec522588fcc41f4d4d
127129
with:
128130
# homage to the python linting utility "black"
129131
commit_message: "ci(build): ✨🍰✨"

.github/workflows/snyk_container.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
jq '.runs = [.runs[0]]' snyk.sarif > snyk.sarif.tmp && mv snyk.sarif.tmp snyk.sarif
4545
fi
4646
- name: Upload result to GitHub Code Scanning
47-
uses: github/codeql-action/upload-sarif@v3
47+
uses: github/codeql-action/upload-sarif@v4
4848
with:
4949
sarif_file: snyk.sarif
5050
category: snyk-container

.github/workflows/update_contributions.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ name: Update Contributions
33

44
on:
55
push:
6-
paths: ["data/contrib/*"]
6+
branches: ["develop"]
7+
paths:
8+
- "data/contrib/*"
79
workflow_dispatch:
810

911
permissions: read-all
@@ -32,6 +34,6 @@ jobs:
3234
- name: Make commit directory safe
3335
run: git config --global --add safe.directory /__w/black-mirror/black-mirror
3436
- name: Commit changes
35-
uses: stefanzweifel/git-auto-commit-action@0b492c0d951b87f3cd12523a542dbd156c1dbc80
37+
uses: stefanzweifel/git-auto-commit-action@fc84150d7c7500bbbaedb7ec522588fcc41f4d4d
3638
with:
3739
commit_message: "ci(contrib): ✨📚✨"

.github/workflows/update_lists.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Update Lists
33

44
on:
55
push:
6+
branches: ["develop"]
67
paths:
78
- "data/v2/manifest.json"
89
workflow_dispatch:
@@ -41,6 +42,6 @@ jobs:
4142
- name: Make commit directory safe
4243
run: git config --global --add safe.directory /__w/black-mirror/black-mirror
4344
- name: Commit changes
44-
uses: stefanzweifel/git-auto-commit-action@0b492c0d951b87f3cd12523a542dbd156c1dbc80
45+
uses: stefanzweifel/git-auto-commit-action@fc84150d7c7500bbbaedb7ec522588fcc41f4d4d
4546
with:
4647
commit_message: "ci(lists): ✨📚✨"

.github/workflows/validate_manifest.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.mega-linter.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ SHOW_ELAPSED_TIME: true
3434
FILEIO_REPORTER: false
3535
PRINT_ALPACA: false
3636
FLAVOR_SUGGESTIONS: false
37+
# schema validation
38+
PRE_COMMANDS:
39+
- command: npx ajv-cli validate -s data/v2/manifest.schema.json -d data/v2/manifest.json
40+
cwd: "workspace"
3741
# remove lingering docker containers when done
3842
POST_COMMANDS:
3943
- command: docker system prune -f

data/v2/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8378,7 +8378,7 @@
83788378
"checksums": {},
83798379
"content": {
83808380
"filter": "NONE",
8381-
"retriever": "LYNX",
8381+
"retriever": "ARIA2",
83828382
"type": "CSV"
83838383
},
83848384
"formats": [

docker/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ USER root
110110
WORKDIR /root
111111

112112
LABEL maintainer="T145" \
113-
version="7.1.1" \
113+
version="7.1.3" \
114114
description="Runs the \"Black Mirror\" project! Check it out GitHub!" \
115115
org.opencontainers.image.created="2025-11-01" \
116-
org.opencontainers.image.revision="7.1.1" \
116+
org.opencontainers.image.revision="7.1.3" \
117117
org.opencontainers.image.source="https://github.com/T145/black-mirror" \
118118
org.opencontainers.image.url="https://github.com/T145/black-mirror" \
119119
org.opencontainers.image.vendor="T145" \
@@ -194,6 +194,7 @@ RUN apk add --no-cache --virtual .perl-build build-base curl gnutar xz perl-util
194194
make -j"$(nproc)"; \
195195
TEST_JOBS="$(nproc)" make test_harness || true; \
196196
make install; \
197+
ln -sf /usr/local/bin/perl /usr/bin/perl; \
197198
apk del .perl-build
198199

199200
WORKDIR /usr/src

scripts/v2/apply_filters.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ process_list() {
212212
'WATCHLIST_INTERNET') mlr --mmap --csv --ifs ';' -N cut -f 1 ;;
213213
'CRUZ_IT') mlr --mmap --csv --headerless-csv-output clean-whitespace then cut -f ip_address ;;
214214
# PhishTank often includes large hashes in its URLs, which may lead to parsing issues.
215-
# Therefore use regex that ignores paths and queries after the domain.
216-
'PHISHTANK') mlr --mmap --csv --headerless-csv-output --lazy-quotes put -S '$url =~ "https?://([^/]+)"; $Domain = "\1"' then cut -f Domain ;;
215+
# Therefore use a robust regex that ignores paths and queries after the domain.
216+
'PHISHTANK') mlr --mmap --csv --headerless-csv-output --lazy-quotes --skip-comments clean-whitespace then cut -f url | get_domains_from_urls ;;
217217
'BLOCKLIST_UA') mlr --mmap --csv --headerless-csv-output --ifs ';' cut -f IP ;;
218218
# The C2 feed has malformed CSVs.
219219
'THREATVIEW_C2_HOSTS') mawk -F, '/^[^#]/{print $3}' ;;

0 commit comments

Comments
 (0)