NoAds UPD #875
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: NoAds UPD | |
on: | |
schedule: | |
- cron: '30 3 * * *' | |
push: | |
paths: | |
- 'contrib/upd_exclude' | |
workflow_dispatch: | |
jobs: | |
noads_upd: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 1 | |
- name: Set Timezone | |
uses: szenius/[email protected] | |
with: | |
timezoneLinux: "Europe/Rome" | |
- name: Set date and time | |
run: sh ./sh/datetime.sh | |
- name: Prepare list header | |
run: | | |
echo "! Title: X Files: UPD uBlock Phishing Domains" > upd.txt | |
echo "! Version:" $update >> upd.txt | |
echo "! Last modified:" $lastmodified >> upd.txt | |
echo "! Expires: 1 day (update frequency)" >> upd.txt | |
echo "!" >> upd.txt | |
echo "! uBlock Phishing Domains blocca siti i web dannosi per la tua navigazione" >> upd.txt | |
echo "! Una lista specificatamente pensata per uBlock Origin" >> upd.txt | |
echo "!" >> upd.txt | |
echo "! Homepage: https://xfiles.noads.it" >> upd.txt | |
echo "! Blog: https://go.gioxx.org/noads" >> upd.txt | |
echo "! Database: https://github.com/mitchellkrogza/Phishing.Database" >> upd.txt | |
echo "! Hosting: GitHub.com" >> upd.txt | |
echo "!" >> upd.txt | |
- name: Make UPD | |
run: sh ./sh/make_upd.sh | |
- name: Prepare vCheck | |
if: ${{ env.stop == 'false' }} | |
run: | | |
num_of_lines=$(grep -v '^! ' "upd.txt" | wc -l) | |
md5=($(md5sum upd.txt| cut -d ' ' -f 1)) | |
echo $update > vcheck/check_upd.txt | |
echo $lastmodified >> vcheck/check_upd.txt | |
echo $checkwebsite >> vcheck/check_upd.txt | |
echo $num_of_lines >> vcheck/check_upd.txt | |
echo $md5 >> vcheck/check_upd.txt | |
- name: Commit UPD | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GWall[bot]" | |
git add upd.txt | |
git add vcheck/check_upd.txt | |
git commit -m "Aggiornamento UPD (GHA) $update del $lastmodified" -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |