Skip to content

Merge hosts files from different sources. #213

Merge hosts files from different sources.

Merge hosts files from different sources. #213

Workflow file for this run

name: Merge hosts files from different sources.
on:
schedule:
- cron: '0 5 * * 0'
workflow_dispatch:
defaults:
run:
working-directory: ./
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create dist directory
run: |
mkdir -p dist
rm -f dist/hosts dist/hosts-ipv4
- name: EasyPrivacy
run: |
cat easyprivacy/dist/hosts >> dist/hosts
cat easyprivacy/dist/hosts-ipv4 >> dist/hosts-ipv4
- name: Exodus
run: |
echo >> dist/hosts
echo >> dist/hosts-ipv4
cat exodus/dist/hosts >> dist/hosts
cat exodus/dist/hosts-ipv4 >> dist/hosts-ipv4
- name: Create hosts file without IP addresses
run: |
cat dist/hosts | egrep -v '^([0-9]{1,3}\.){3}[0-9]{1,3}$' > dist/hosts-noip
- name: Commit changes
uses: EndBug/add-and-commit@v5.3.0
with:
author_name: Marcus Husar
author_email: marcus.husar@gmail.com
message: 'Update merged hosts files from different sources.'
add: 'dist'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}