actions to 11 #45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| schedule: | |
| - cron: '0 0 1 * *' # runs at 00:00 UTC on the 1st day of every month | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - '.github/workflows/update-cloudflare-proxies.yml' | |
| - 'Common/CloudflareIPs.targets' | |
| name: Update Cloudflare Proxies | |
| env: | |
| DOTNET_VERSION: 11.0.x | |
| jobs: | |
| update-proxies: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| ref: ${{ github.ref }} | |
| - uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5.4.0 | |
| with: | |
| global-json-file: global.json | |
| - name: Regenerate Cloudflare IPs source | |
| run: dotnet build Common/Common.csproj -p:UpdateCloudflareIPs=true | |
| - name: Commit and Push Changes | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add Common/Utils/CloudflareNetworks.g.cs | |
| if git diff --cached --quiet; then | |
| echo "No changes detected." | |
| else | |
| git commit -m "chore: Update Cloudflare proxy IP lists [auto-generated]" | |
| git push | |
| fi |