Bumps the actions group with 3 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) and [actions/setup-node](https://github.com/actions/setup-node). Updates `actions/checkout` from 4.2.2 to 5.0.0 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4.2.2...08c6903cd8c0fde910a37f88322edcfb5dd907a8) Updates `aws-actions/configure-aws-credentials` from 5.0.0 to 5.1.0 - [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases) - [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md) - [Commits](https://github.com/aws-actions/configure-aws-credentials/compare/a03048d87541d1d9fcf2ecf528a4a65ba9bd7838...00943011d9042930efac3dcd3a170e4273319bc8) Updates `actions/setup-node` from 5.0.0 to 6.0.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/a0853c24544627f65ddf259abe73b1d18a591444...2028fbc5c25fe9cf00d9f06a71cc4710d4507903) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: aws-actions/configure-aws-credentials dependency-version: 5.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: actions/setup-node dependency-version: 6.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
93 lines
3.6 KiB
YAML
93 lines
3.6 KiB
YAML
name: test-ci-cleanup-oss
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
# * is a special character in YAML so you have to quote this string
|
|
- cron: '05 02 * * *'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
setup:
|
|
if: ${{ github.event.repository.name == 'boundary' }}
|
|
runs-on: ${{ fromJSON(vars.RUNNER) }}
|
|
outputs:
|
|
regions: ${{steps.regions.outputs.regions}}
|
|
steps:
|
|
- name: Configure AWS credentials
|
|
uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0
|
|
with:
|
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_CI }}
|
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_CI }}
|
|
aws-region: us-east-1
|
|
role-to-assume: ${{ secrets.AWS_ROLE_ARN_CI }}
|
|
role-skip-session-tagging: true
|
|
role-duration-seconds: 3600
|
|
- name: Get all regions
|
|
id: regions
|
|
run: |
|
|
echo "regions=$(aws ec2 describe-regions --region us-east-1 --output json --query 'Regions[].RegionName' | tr -d '\n ')" >> "$GITHUB_OUTPUT"
|
|
|
|
aws-nuke:
|
|
if: ${{ github.event.repository.name == 'boundary' }}
|
|
runs-on: ${{ fromJSON(vars.RUNNER) }}
|
|
container:
|
|
image: rebuy/aws-nuke
|
|
options:
|
|
--user root
|
|
-t
|
|
env:
|
|
TIME_LIMIT: "48h"
|
|
timeout-minutes: 60
|
|
steps:
|
|
- name: Configure AWS credentials
|
|
id: aws-configure
|
|
uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0
|
|
with:
|
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_CI }}
|
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_CI }}
|
|
aws-region: us-east-1
|
|
role-to-assume: ${{ secrets.AWS_ROLE_ARN_CI }}
|
|
role-skip-session-tagging: true
|
|
role-duration-seconds: 3600
|
|
mask-aws-account-id: false
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- name: Configure
|
|
run: |
|
|
cp enos/ci/aws-nuke.yml .
|
|
sed -i "s/ACCOUNT_NUM/${{ steps.aws-configure.outputs.aws-account-id }}/g" aws-nuke.yml
|
|
sed -i "s/TIME_LIMIT/${TIME_LIMIT}/g" aws-nuke.yml
|
|
# We don't care if cleanup succeeds or fails, because dependencies be dependenceies,
|
|
# we'll fail on actually actionable things in the quota steep afterwards.
|
|
- name: Clean up abandoned resources
|
|
# Filter STDERR because it's super noisy about things we don't have access to
|
|
run: |
|
|
aws-nuke -c aws-nuke.yml -q --no-dry-run --force 2>/tmp/aws-nuke-error.log || true
|
|
|
|
check-quotas:
|
|
if: ${{ github.event.repository.name == 'boundary' }}
|
|
needs: [ setup, aws-nuke ]
|
|
runs-on: ${{ fromJSON(vars.RUNNER) }}
|
|
container:
|
|
image: jantman/awslimitchecker
|
|
env:
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_CI }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_CI }}
|
|
strategy:
|
|
matrix:
|
|
region: ${{ fromJSON(needs.setup.outputs.regions) }}
|
|
steps:
|
|
- name: Configure AWS credentials
|
|
uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0
|
|
with:
|
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_CI }}
|
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_CI }}
|
|
aws-region: us-east-1
|
|
role-to-assume: ${{ secrets.AWS_ROLE_ARN_CI }}
|
|
role-skip-session-tagging: true
|
|
role-duration-seconds: 3600
|
|
# Currently just checking VPC limits across all region, can add more checks here in future
|
|
- name: Check AWS Quotas
|
|
run: awslimitchecker -S "VPC" -r ${{matrix.region}}
|