AB2D WAF IP Sets Sync #1
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
name: AB2D WAF IP Sets Sync | |
on: | |
workflow_dispatch: # Allow manual trigger | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
waf-ip-sync: | |
runs-on: self-hosted | |
defaults: | |
run: | |
working-directory: ./scripts | |
strategy: | |
matrix: | |
app: [ab2d] | |
env: [dev, test] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
with: | |
repository: CMSgov/cdap-private | |
ref: 'main' | |
sparse-checkout: ip_sets/ab2d/allowed_ips.txt | |
sparse-checkout-cone-mode: false | |
token: ${{ env.GITHUB_TOKEN }} | |
- uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::${{ secrets[format('{0}_{1}_ACCOUNT', matrix.app, matrix.env)] }}:role/delegatedadmin/developer/${{ matrix.app }}-${{ matrix.env }}-github-actions | |
aws-region: ${{ vars.AWS_REGION }} | |
- run: bash waf-ip-set-sync.sh | |
env: | |
APP: ${{ matrix.app }} | |
ENV: ${{ matrix.env }} |