Skip to content

NoAds UPD Domains Only #389

NoAds UPD Domains Only

NoAds UPD Domains Only #389

Workflow file for this run

name: NoAds UPD Domains Only
on:
schedule:
- cron: '55 3 * * *'
push:
paths:
- 'contrib/upd_exclude'
workflow_dispatch:
jobs:
noads_domains:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Sleep Action
uses: juliangruber/sleep-action@v2.0.0
with:
time: 2m
- name: Set Timezone
uses: szenius/set-timezone@v1.1
with:
timezoneLinux: "Europe/Rome"
- name: Set date and time
run: sh ./sh/datetime.sh
- name: Make UPD Domains
run: sh ./sh/make_domains.sh
- name: Prepare vCheck
if: ${{ env.stop == 'false' }}
run: |
num_of_lines=$(< "domains/upd_domains.txt" wc -l)
md5=($(md5sum domains/upd_domains.txt| cut -d ' ' -f 1))
echo $update > vcheck/check_domains.txt
echo $lastmodified >> vcheck/check_domains.txt
echo $checkwebsite >> vcheck/check_domains.txt
echo $num_of_lines >> vcheck/check_domains.txt
echo $md5 >> vcheck/check_domains.txt
- name: Run CommitsWithinTime script
uses: AlexHolderDeveloper/CommitsWithinTime@v1.1.11
id: commitswithintime
- name: Get the output from CommitsWithinTime
if: ${{ env.stop == 'false' }}
run: |
echo ${{ steps.commitswithintime.outputs.total-commits }} > vcheck/check_gh.txt
- name: Commit UPD Domains
if: ${{ env.stop == 'false' }}
run: |
git config --local user.email "114237374+GWall-bot@users.noreply.github.com"
git config --local user.name "GWall[bot]"
git add domains/upd_domains.txt
git add vcheck/check_domains.txt
git add vcheck/check_gh.txt
git commit -m "Aggiornamento UPD Domains (GHA) $update del $lastmodified" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}