curl -oL ./ https://github.com/Loyalsoldier/v2ray-rules-dat/blob/release/geosite.dat.sha256sum?raw=true
if diff -q "geosite.dat.sha256sum" "publish/geosite.dat.sha256sum"; then
echo "upstream_status=updated" >> $GITHUB_ENV
else
echo "upstream_status=not_updated" >>$GITHUB_ENV
fi
然后在workflow中添加判断:
- name: Do something if upstream is updated
if: ${{ env.upstream_status }} == 'not_updated'
run: |
echo "Upstream is not updated, performing additional actions..."
我认为如果上游并没有更新的话再发布一个新release是没有必要的,所以有了这个想法。
简短的代码示意:
然后在workflow中添加判断:
这样就能减少release的发布了。