Skip to content

Commit 2365bd9

Browse files
committed
ci: add a test sweeper after CodeBuild run
1 parent 9867f37 commit 2365bd9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/aws-ci.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
name: AWS CI
32

43
on:
@@ -7,7 +6,7 @@ on:
76
branches:
87
- master
98
- dev
10-
- 'feature/**'
9+
- "feature/**"
1110

1211
permissions:
1312
id-token: write
@@ -16,7 +15,7 @@ jobs:
1615
run-ci:
1716
runs-on: ubuntu-latest
1817
steps:
19-
- name: Configure AWS Credentials
18+
- name: Configure Load Balancer Credentials
2019
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 #v4
2120
with:
2221
role-to-assume: ${{ secrets.CI_MAIN_TESTING_ACCOUNT_ROLE_ARN }}
@@ -40,8 +39,14 @@ jobs:
4039
uses: aws-actions/aws-codebuild-run-build@v1
4140
with:
4241
project-name: ${{ secrets.CI_TESTING_CODE_BUILD_PROJECT_NAME }}
42+
- name: Invoke Test Sweeper Lambda
43+
if: always()
44+
shell: pwsh
45+
run: |
46+
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 }}"}'
4347
- name: CodeBuild Link
4448
shell: pwsh
4549
run: |
4650
$buildId = "${{ steps.codebuild.outputs.aws-build-id }}"
4751
echo $buildId
52+

0 commit comments

Comments
 (0)