Publish Cloudflare Networks #286
This file contains 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
--- | |
name: "Publish Cloudflare Networks" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
env: | |
DEFAULT_CLOUDFLARE_NETWORKS_FILE: |- | |
k8s/networking/traefik/templates/mw-restrict-ips.yaml | |
jobs: | |
cloudflare-networks: | |
name: Cloudflare Networks | |
runs-on: ubuntu-latest | |
steps: | |
- name: Generate Token | |
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 | |
id: generate-token | |
with: | |
app_id: "${{ secrets.BOT_APP_ID }}" | |
private_key: "${{ secrets.BOT_APP_PRIVATE_KEY }}" | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
token: "${{ steps.generate-token.outputs.token }}" | |
- name: Cloudflare Networks | |
run: | | |
bash ./.github/scripts/cloudflare-networks.sh $DEFAULT_CLOUDFLARE_NETWORKS_FILE | |
- name: Create pull request | |
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2 | |
with: | |
token: "${{ steps.generate-token.outputs.token }}" | |
committer: "mfin-bot <123061670+mfin-bot[bot]@users.noreply.github.com>" | |
author: "mfin-bot <123061670+mfin-bot[bot]@users.noreply.github.com>" | |
branch: github-action/update-cloudflare-networks | |
delete-branch: true | |
title: "chore(github-action): update cloudflare networks" | |
signoff: true | |
commit-message: "chore(github-action): update cloudflare networks" | |
body: | | |
Update cloudflare networks middleware from https://api.cloudflare.com/client/v4/ips | |
labels: | | |
renovate/github-action |