Skip to content

changed ipv4 address for London router #159

changed ipv4 address for London router

changed ipv4 address for London router #159

name: Dispatch Configuration
on:
pull_request_target:
branches: [main]
types: [closed]
paths:
- 'routers/*.yml'
jobs:
set-limit:
if: ${{ github.event.pull_request.merged }}
name: Determine Limit
runs-on: ubuntu-latest
steps:
- uses: tj-actions/changed-files@v45
with:
files: |
routers/**
write_output_files: true
- id: set-limit
run: |
echo "limit=$(cat .github/outputs/all_changed_files.txt | grep -E -o '([a-z]{3}[0-9]{1})' | jq -Rcn '[inputs]')" >> $GITHUB_OUTPUT
outputs:
limit: ${{ steps.set-limit.outputs.limit }}
dispatch:
name: Dispatch Configuration Job
needs: set-limit
runs-on: ubuntu-latest
env:
limit: ${{ join(fromJson(needs.set-limit.outputs.limit)) }}
steps:
- name: Dispatch peer configuration workflow
if: env.limit != ''
run: |
curl -H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.DISPATCH_TOKEN }}" \
--request POST \
--data '{"event_type": "deploy_peers", "client_payload": {"limit": "${{ env.limit }}" }}"}' \
${{ secrets.DISPATCH_URL }}
comment_on_pr:
name: Comment on Pull Request
needs: set-limit
runs-on: ubuntu-latest
strategy:
matrix:
limit: ${{ fromJson(needs.set-limit.outputs.limit) }}
steps:
- uses: actions/checkout@v4
- run: |
echo "POP_UPPERCASE=$(echo ${{ matrix.limit }} | tr '[:lower:]' '[:upper:]')" >> $GITHUB_ENV
echo "POP_LOWERCASE=$(echo ${{ matrix.limit }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "PULL_REQUEST_ID=${{ github.event.number }}" >> $GITHUB_ENV
- run: envsubst < .github/templates/deploy_started.tmpl > .github/deploy_started.txt
- uses: thollander/actions-comment-pull-request@v2
with:
filePath: .github/deploy_started.txt
comment_tag: ${{ matrix.limit }}
pr_number: ${{ github.event.number }}