Check Expired Domains From Filterlists #34
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: "Check Expired Domains From Filterlists" | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
number_of_KAD_jobs: | ||
description: "Number of KAD jobs" | ||
required: true | ||
default: 3 | ||
# schedule: | ||
# - cron: "55 23 * * 6" | ||
jobs: | ||
KAD_S: | ||
runs-on: ubuntu-latest | ||
container: polishfiltersteam/expired_domains_image:latest | ||
outputs: | ||
job-strategy-matrix: ${{ steps.generate.outputs.job-strategy-matrix }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: | | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
./scripts/CI/CI_LETS_DO_THIS.sh KAD | ||
./scripts/CI/CI_LETS_DO_THIS.sh KADhosts | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: E_KAD_S | ||
path: | | ||
split/KAD_0* | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: E_KADH_S | ||
path: | | ||
split/KADhosts_0* | ||
- id: generate | ||
run: | | ||
JOB_STRATEGY_MATRIX=$(node -e "let r=[]; for(let i = 1; i <= process.env.NUMBER_OF_KAD_JOBS; i++) { r.push(i) }; console.log(JSON.stringify(r));") | ||
echo "::set-output name=job-strategy-matrix::$JOB_STRATEGY_MATRIX" | ||
env: | ||
NUMBER_OF_KAD_JOBS: ${{ github.event.inputs.number_of_kad_jobs }} | ||
KAD: | ||
needs: KAD_S | ||
runs-on: ubuntu-latest | ||
container: polishfiltersteam/expired_domains_image:latest | ||
strategy: | ||
matrix: | ||
job: ${{ fromJson(needs.KAD_S.outputs.job-strategy-matrix) }} | ||
max-parallel: ${{ github.event.inputs.number_of_kad_jobs }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: E_KAD_S | ||
path: split | ||
- run: | | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
./scripts/CI/CI_LETS_DO_THIS.sh KAD_0${{ matrix.job }} | ||
echo 'E_KAD_0<<EOF' >> $GITHUB_ENV | ||
echo "$(./scripts/CI/getFileListForED.sh KAD_0${{ matrix.job }})" >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV | ||
echo "currentKADName=E_KAD_0${{ matrix.job }}" >> $GITHUB_ENV | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ env.currentKADName }} | ||
path: | | ||
${{ env.E_KAD_0 }} | ||
KADhosts_01: | ||
needs: KAD_S | ||
runs-on: ubuntu-latest | ||
container: polishfiltersteam/expired_domains_image:latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: E_KADH_S | ||
path: split | ||
- run: | | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
./scripts/CI/CI_LETS_DO_THIS.sh KADhosts_01 | ||
echo 'E_KADH_01<<EOF' >> $GITHUB_ENV | ||
echo "$(./scripts/CI/getFileListForED.sh KADhosts_01)" >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: E_KADH_01 | ||
path: | | ||
${{ env.E_KADH_01 }} | ||
KADhosts_02: | ||
needs: KAD_S | ||
runs-on: ubuntu-latest | ||
container: polishfiltersteam/expired_domains_image:latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: E_KADH_S | ||
path: split | ||
- run: | | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
./scripts/CI/CI_LETS_DO_THIS.sh KADhosts_02 | ||
echo 'E_KADH_02<<EOF' >> $GITHUB_ENV | ||
echo "$(./scripts/CI/getFileListForED.sh KADhosts_02)" >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: E_KADH_02 | ||
path: | | ||
${{ env.E_KADH_02 }} | ||
PAF: | ||
runs-on: ubuntu-latest | ||
container: polishfiltersteam/expired_domains_image:latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: | | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
./scripts/CI/CI_LETS_DO_THIS.sh PAF_C | ||
echo 'E_PAF<<EOF' >> $GITHUB_ENV | ||
echo "$(./scripts/CI/getFileListForED.sh \ | ||
PAF_arrows \ | ||
PAF_backgrounds_self-advertising \ | ||
PAF_contact_feedback_widgets \ | ||
PAF_e_newspaper \ | ||
PAF_newsletters \ | ||
PAF_other_widgets \ | ||
PAF_pop-ups \ | ||
PAF_push \ | ||
PAF_scrolling_videos \ | ||
PAF_backgrounds_self-adv_supp \ | ||
PAF_comeback_titles \ | ||
PAF_contact_feedback_widgets_supp \ | ||
PAF_newsletters_supp \ | ||
PAF_other_elements_supp \ | ||
PAF_pop-ups_supp \ | ||
PAF_push_supp \ | ||
PAF_scrolling_videos_supp \ | ||
PAF_tagged_internal_links)" >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: E_PAF | ||
path: | | ||
${{ env.E_PAF }} | ||
SocialPASS: | ||
runs-on: ubuntu-latest | ||
container: polishfiltersteam/expired_domains_image:latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: | | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
./scripts/CI/CI_LETS_DO_THIS.sh Social_C | ||
./scripts/CI/CI_LETS_DO_THIS.sh PASS | ||
echo 'E_SOCIAL<<EOF' >> $GITHUB_ENV | ||
echo "$(./scripts/CI/getFileListForED.sh polish_rss_filters polish_rss_filters_supp adblock_social_list social_filters_uB_AG)" >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: E_SOCIAL | ||
path: | | ||
${{ env.E_SOCIAL }} | ||
Cookies: | ||
runs-on: ubuntu-latest | ||
container: polishfiltersteam/expired_domains_image:latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: | | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
./scripts/CI/CI_LETS_DO_THIS.sh Cookies_C | ||
echo 'E_COOKIES<<EOF' >> $GITHUB_ENV | ||
echo "$(./scripts/CI/getFileListForED.sh adblock_cookies cookies_uB_AG)" >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: E_COOKIES | ||
path: | | ||
${{ env.E_COOKIES }} | ||
KAD_limit: | ||
needs: [KAD] | ||
runs-on: ubuntu-latest | ||
container: polishfiltersteam/expired_domains_image:latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dawidd6/action-download-artifact@v2 | ||
with: | ||
name: E_KAD_0 | ||
path: expired-domains | ||
name_is_regexp: true | ||
- run: | | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
./scripts/CI/CI_LETS_DO_THIS_KAD_limit.sh | ||
echo 'E_KAD<<EOF' >> $GITHUB_ENV | ||
echo "$(./scripts/CI/getFileListForED.sh KAD)" >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: E_KAD | ||
path: | | ||
${{ env.E_KAD }} | ||
deploy: | ||
needs: [KAD_limit, KADhosts_00, KADhosts_01, PAF, SocialPASS, Cookies] | ||
Check failure on line 199 in .github/workflows/expiredDomains.yml GitHub Actions / Check Expired Domains From FilterlistsInvalid workflow file
|
||
runs-on: ubuntu-latest | ||
container: polishfiltersteam/expired_domains_image:latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
## See https://github.com/actions/download-artifact/issues/68 | ||
## Unfortunately currently it's not possible to skip creating extra directory | ||
## when we want to download all artifacts at once without specyfing name. | ||
## Bad joke... | ||
- continue-on-error: true | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: E_KAD | ||
path: expired-domains | ||
- continue-on-error: true | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: E_KADH_00 | ||
path: expired-domains | ||
- continue-on-error: true | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: E_KADH_01 | ||
path: expired-domains | ||
# - continue-on-error: true | ||
# uses: actions/download-artifact@v3 | ||
# with: | ||
# name: E_KADH_02 | ||
# path: expired-domains | ||
# - continue-on-error: true | ||
# uses: actions/download-artifact@v3 | ||
# with: | ||
# name: E_KADH_03 | ||
# path: expired-domains | ||
- continue-on-error: true | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: E_PAF | ||
path: expired-domains | ||
- continue-on-error: true | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: E_SOCIAL | ||
path: expired-domains | ||
- continue-on-error: true | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: E_COOKIES | ||
path: expired-domains | ||
- run: | | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
./scripts/CI/cleanup_push.sh |