NoAds Stable #50
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 Stable | |
on: | |
schedule: | |
- cron: '0 0 */18 * *' | |
workflow_dispatch: | |
jobs: | |
noads_stable: | |
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 "[Adblock Plus 2.8]" > filtri.txt | |
echo "! Title: NoAds X Files" >> filtri.txt | |
echo "! Version:" $update >> filtri.txt | |
echo "! X Files migliora la tua navigazione quotidiana!" >> filtri.txt | |
echo "! Last modified:" $lastmodified >> filtri.txt | |
echo "! Expires: 15 days" >> filtri.txt | |
echo "! Homepage: https://xfiles.noads.it" >> filtri.txt | |
echo "! Blog: https://go.gioxx.org/noads" >> filtri.txt | |
echo "! Hosting: GitHub.com" >> filtri.txt | |
echo "!" >> filtri.txt | |
- name: Make Stable | |
run: sh ./sh/make_stable.sh | |
- name: Prepare vCheck | |
if: ${{ env.stop == 'false' }} | |
run: | | |
num_of_lines=$(grep -v '^! ' "filtri.txt" | wc -l) | |
md5=($(md5sum filtri.txt| cut -d ' ' -f 1)) | |
echo $update > vcheck/check_filtri.txt | |
echo $lastmodified >> vcheck/check_filtri.txt | |
echo $checkwebsite >> vcheck/check_filtri.txt | |
echo $num_of_lines >> vcheck/check_filtri.txt | |
echo $md5 >> vcheck/check_filtri.txt | |
- name: Commit Stable | |
if: ${{ env.stop == 'false' }} | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GWall[bot]" | |
git add filtri.txt | |
git add vcheck/check_filtri.txt | |
git commit -m "Aggiornamento Stable (GHA) $update del $lastmodified" -a | |
- name: Push Stable | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |