forked from shahsamkit/python-github-action-template
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (27 loc) · 933 Bytes
/
upload.yml
File metadata and controls
34 lines (27 loc) · 933 Bytes
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
name: Upload status.log to S3
on:
push:
branches:
- main # Change this to the branch you want to trigger the action
permissions:
id-token: write
contents: read
jobs:
upload_to_s3:
runs-on: ubuntu-latest
environment: Production
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::163743247939:role/690ed370-4b9e-11ef-b564-02032ef24423-GitHubDeploymentRole
aws-region: ap-southeast-2 # e.g., us-west-2
role-session-name: 690ed370-4b9e-11ef-b564-02032ef24423-GitHubDeploymentRole
- name: Debug AWS credentials
run: |
aws sts get-caller-identity
- name: Upload status.log to S3
run: |
aws s3 cp status.log s3://ec-class-data/log/status.log --region us-east-1