Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanyeye authored Jan 25, 2023
1 parent 63b054e commit b295f5e
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,13 @@ jobs:
run: |
echo "RELEASE_NAME=Released on $(date +%Y.%m.%d-%H:%M)" >> $GITHUB_ENV
echo "TAG_NAME=$(date +%Y%m%d%H%M)" >> $GITHUB_ENV
echo "custom_rules=https://raw.githubusercontent.com/$GITHUB_REPOSITORY/main/rules.txt" >> $GITHUB_ENV
ls -al
for x in $(find $pwd -name "*rules.txt" | xargs ls -d);
do
echo ${x}
file=${x#*./}
echo "${file%.txt}=https://raw.githubusercontent.com/$GITHUB_REPOSITORY/main/${file}" >> $GITHUB_ENV;
done
shell: bash
- name: Generate rules.txt file
run: |
ls -al
echo "payload:" > rules.txt
curl -sSL ${custom_rules} | grep -Ev "^(regexp|keyword):" | perl -ne '/^(domain:|full:)?([-_a-zA-Z0-9]+(\.[-_a-zA-Z0-9]+)*)/ && print " - |+.$2|\n"' | sed "s/|/'/g" >> rules.txt
# curl -sSL ${microsoft_rules} > microsoft-rules.txt
# curl -sSL ${global_network_rules} > global-network-rules.txt
# curl -sSL ${domestic_media_rules} > domestic-media-rules.txt
# curl -sSL ${foreign_media_rules} > foreign-media-rules.txt
# curl -sSL ${blacklist_rules} > blacklist-rules.txt
for x in $(find $pwd -name "*rules.txt" | xargs ls -d);
do
for x in $(find $pwd -name "*rules.txt" | xargs ls -d); do
echo ${x}
file=${x#*./}
curl -sSL "https://raw.githubusercontent.com/$GITHUB_REPOSITORY/main/${file}" > ${file}
done
- name: Move files to publish directory
Expand Down

0 comments on commit b295f5e

Please sign in to comment.