Skip to content

Commit

Permalink
Update CI (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
bootmortis authored Nov 7, 2023
1 parent f53e7e6 commit 74e8ee3
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ on:
schedule:
- cron: '0 0 * * Mon'
workflow_dispatch:
inputs:
force_update:
description: 'Force update'
required: false
default: 'false'

jobs:
crawl:
Expand Down Expand Up @@ -53,15 +48,9 @@ jobs:
echo "total $total"
echo "old $old"
if [[ ${{ github.event.inputs.force_update || 'false' }} == 'true' || $total -ne $old ]]; then
echo "SHOULD_UPDATE=true" >> $GITHUB_ENV
echo "Should Update"
fi
echo "TOTAL_DOMAINS=$total" >> $GITHUB_ENV
- name: Build .dat file
if: ${{ env.SHOULD_UPDATE }}
run: |
git clone https://github.com/v2fly/domain-list-community
rm -rf domain-list-community/data/*
Expand All @@ -79,7 +68,6 @@ jobs:
mv dlc.dat iran.dat
- name: Build sing-box .db file
if: ${{ env.SHOULD_UPDATE }}
run: |
git clone https://github.com/bootmortis/sing-geosite
Expand All @@ -90,15 +78,13 @@ jobs:
mv iran-geosite.db ../output/iran-geosite.db
- name: Calculate checksum
if: ${{ env.SHOULD_UPDATE }}
run: |
cd output
for file in *; do
sha256sum $file > $file.sha256
done
- name: Upload result as release
if: ${{ env.SHOULD_UPDATE }}
uses: ncipollo/release-action@v1
with:
artifacts: "output/*.*"
Expand Down

0 comments on commit 74e8ee3

Please sign in to comment.