-
Notifications
You must be signed in to change notification settings - Fork 49
39 lines (31 loc) · 1.18 KB
/
sync-to-test.yaml
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
37
38
39
name: Sync Test Branch to S3
permissions:
contents: write
on:
push:
branches:
- test
jobs:
sync-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Sync
run: |
aws cloudformation package --template-file cloudformation/BillingMetrics-Template.yaml --s3-bucket ${S3_BUCKET} \
--s3-prefix aws-account-automation-lambda-transform --output-template-file cloudformation/BillingMetrics-Template-Transformed.yaml \
--metadata build_ver=$(git rev-parse --short "$GITHUB_SHA")
aws s3 sync --delete cloudformation/ s3://${S3_BUCKET}/aws-account-automation/ --content-type text/plain
pip install boto3
.github/workflows/index_files.py > Test-Links.md
git checkout test
git config user.name github-actions
git config user.email [email protected]
git add Test-Links.md
git commit -m "AutoGenerated Links File"
git push origin HEAD:test
env:
S3_BUCKET: pht-cloudformation-dev
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1'