Skip to content

Commit

Permalink
Update run.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Larvan2 committed Mar 7, 2023
1 parent 313fa51 commit ecae5f8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/delete.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Delete old workflow runs
on:
schedule:
- cron: '0 0 1 * *'
# Run monthly, at 00:00 on the 1st day of month.

jobs:
del_runs:
runs-on: ubuntu-latest
steps:
- name: Delete workflow runs
uses: GitRML/delete-workflow-runs@main
with:
token: ${{ secrets.AUTH_PAT }}
repository: ${{ github.repository }}
retain_days: 30
14 changes: 5 additions & 9 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,31 +198,27 @@ jobs:
sed -i 's/Dreamacro\/maxmind-geoip/Loyalsoldier\/geoip/g' main.go
go run -v .
- name: Move and zip files and generate sha256 hash
- name: Move and zip files
run: |
mkdir -p ./publish/
wget https://raw.githubusercontent.com/Loyalsoldier/geoip/release/Country.mmdb -O ./publish/country.mmdb
install -Dp ./geoip.dat ./publish/
install -Dp ./geoip.dat.sha256sum ./publish/
install -Dp ./custom/publish/geosite.dat ./publish/
install -Dp ./sing-geosite/geosite.db ./publish/
install -Dp ./sing-geosite/geosite-v2fly.db ./publish/
install -Dp ./sing-geoip/geoip.db ./publish/
install -p {proxy,direct,reject}-tld-list.txt ./publish/
install -p {proxy,direct,reject}-list.txt ./publish/
install -p hosts ./publish/
install -p {apple-cn,google-cn,gfw,win-spy,win-update,win-extra}.txt ./publish/
install -p apple-cn.txt ./publish/
cd ./publish || exit 1
zip rules.zip {proxy,direct,reject}-list.txt geoip.dat geosite.dat geosite.db geosite-v2fly.db geoip.db
sha256sum geosite.dat > geosite.dat.sha256sum
sha256sum geosite.db > geosite.db.sha256sum
sha256sum geoip.db > geoip.db.sha256sum
sha256sum rules.zip > rules.zip.sha256sum
- name: Release and upload assets
uses: softprops/[email protected]
with:
name: ${{ env.RELEASE_NAME }}
tag_name: ${{ env.TAG_NAME }}
tag_name: latest
draft: false
prerelease: false
files: |
Expand Down

0 comments on commit ecae5f8

Please sign in to comment.