generated from cfpb/open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (30 loc) · 1.22 KB
/
codebuild_runner_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: GHA Codebuild Runner Test
on:
pull_request:
branches: [main]
jobs:
test1:
env:
CLOUDWATCH_LOGGROUP_NAME: '/aws/codebuild/cfpb-regtech-gha-test-1'
CLOUDWATCH_LOGSTREAM_NAME: ${{ github.run_id }}${{ github.run_number }}${{ github.run_attempt }}
runs-on:
- codebuild-cfpb-regtech-gha-test-1-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v4
- name: echo
run: |
echo "force trigger again"
echo -e "running GHA workflow ${{ github.event.number }}\nbuild: ${{ github.run_id }}\nattempt: ${{ github.run_attempt }}"
- name: create log stream
run: |
aws logs create-log-stream --log-group-name $CLOUDWATCH_LOGGROUP_NAME --log-stream-name $CLOUDWATCH_LOGSTREAM_NAME
- name: list buckets
run: |
aws s3api list-buckets --region us-east-1 --output json
- name: put events
env:
GH_TOKEN: ${{ github.token }}
run: |
gh run view ${{ github.run_id }} --log >runevents
aws logs put-log-events --log-group-name $CLOUDWATCH_LOGGROUP_NAME --log-stream-name $CLOUDWATCH_LOGSTREAM_NAME --log-events runevents