Bumps the actions group with 4 updates: [actions/cache](https://github.com/actions/cache), [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials), [google-github-actions/setup-gcloud](https://github.com/google-github-actions/setup-gcloud) and [actions/download-artifact](https://github.com/actions/download-artifact). Updates `actions/cache` from 4.2.3 to 4.2.4 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/5a3ec84eff668545956fd18022155c47e93e2684...0400d5f644dc74513175e3cd8d07132dd4860809) Updates `aws-actions/configure-aws-credentials` from 4.2.1 to 4.3.1 - [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/b47578312673ae6fa5b5096b330d9fbac3d116df...7474bc4690e29a8392af63c5b98e7449536d5c3a) Updates `google-github-actions/setup-gcloud` from 2.1.5 to 2.2.0 - [Release notes](https://github.com/google-github-actions/setup-gcloud/releases) - [Changelog](https://github.com/google-github-actions/setup-gcloud/blob/main/CHANGELOG.md) - [Commits](https://github.com/google-github-actions/setup-gcloud/compare/6a7c903a70c8625ed6700fa299f5ddb4ca6022e9...cb1e50a9932213ecece00a606661ae9ca44f3397) Updates `actions/download-artifact` from 4.3.0 to 5.0.0 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/d3f86a106a0bac45b974a628896c90dbdf5c8093...634f93cb2916e3fdff6788551b99b062d0335ce0) --- updated-dependencies: - dependency-name: actions/cache dependency-version: 4.2.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: aws-actions/configure-aws-credentials dependency-version: 4.3.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: google-github-actions/setup-gcloud dependency-version: 2.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: actions/download-artifact dependency-version: 5.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>
94 lines
3.7 KiB
YAML
94 lines
3.7 KiB
YAML
name: test-ci-cleanup-oss
|
|
on:
|
|
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@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1
|
|
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:
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
TIME_LIMIT: "48h"
|
|
timeout-minutes: 60
|
|
steps:
|
|
- name: Configure AWS credentials
|
|
id: aws-configure
|
|
uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1
|
|
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- 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@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1
|
|
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}}
|