Skip to content

ci: add a test sweeper after CodeBuild run #2018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/aws-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: AWS CI

on:
Expand All @@ -7,7 +6,7 @@ on:
branches:
- master
- dev
- 'feature/**'
- "feature/**"

permissions:
id-token: write
Expand All @@ -16,7 +15,7 @@ jobs:
run-ci:
runs-on: ubuntu-latest
steps:
- name: Configure AWS Credentials
- name: Configure Load Balancer Credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 #v4
with:
role-to-assume: ${{ secrets.CI_MAIN_TESTING_ACCOUNT_ROLE_ARN }}
Expand All @@ -40,8 +39,14 @@ jobs:
uses: aws-actions/aws-codebuild-run-build@v1
with:
project-name: ${{ secrets.CI_TESTING_CODE_BUILD_PROJECT_NAME }}
- name: Invoke Test Sweeper Lambda
if: always()
shell: pwsh
run: |
aws lambda invoke response.json --function-name "${{ secrets.CI_TESTING_TEST_SWEEPER_LAMBDA_NAME }}" --cli-binary-format raw-in-base64-out --payload '{"Tags": "aws-repo=${{ secrets.CI_TESTING_CODE_BUILD_PROJECT_NAME }}"}'
- name: CodeBuild Link
shell: pwsh
run: |
$buildId = "${{ steps.codebuild.outputs.aws-build-id }}"
echo $buildId

Loading