Skip to content

Publish MktList

Publish MktList #756

Workflow file for this run

name: Publish MktList
on:
schedule:
- cron: '0 9 * * *'
jobs:
run:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Download IP's
run: |
curl -s https://antifilter.network/download/ip.lst > ./rkn_ips.lst
curl -s https://antifilter.network/download/ipsum.lst >> ./rkn_ips.lst
curl -s https://antifilter.network/download/subnet.lst >> ./rkn_ips.lst
cat ./rkn_ips.lst | sort -t. -n -k1,1 -k2,2 -k3,3 -k4,4 | uniq | awk -f ./script.awk > ./subnets.rsc
curl -s https://antifilter.download/list/allyouneed.rsc > allyouneed.rsc
echo "/ip firewall address-list add list=rkn address=65.9.85.0/24" >> allyouneed.rsc
echo "/ip firewall address-list add list=rkn address=151.101.85.183" >> allyouneed.rsc
mkdir -p upload
cp -v ./subnets.rsc upload
cp -v ./allyouneed.rsc upload
echo "TAG_NAME=$(date +"%Y.%m.%d")" >> $GITHUB_ENV
- name: Push to "download" branch
run: |
cd upload
git init
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git checkout -b download
git add .
git commit -m "${{ env.TAG_NAME }}"
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
git push -f origin download
- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAG_NAME }}
body: ${{ env.TAG_NAME }}
files: |
./upload/allyouneed.rsc
./upload/subnets.rsc
# - name: Upload binaries to release
# uses: svenstaro/upload-release-action@v2
# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: upload/allyouneed.rsc
# tag: ${{ github.ref }}
# overwrite: true
# file_glob: true
- name: Remove old Releases
uses: dev-drprasad/delete-older-releases@v0.2.0
with:
keep_latest: 1
delete_tags: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}