-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (35 loc) · 1.21 KB
/
build-push.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
37
38
39
40
41
42
43
44
name: ReleaseZip
on:
push:
branches:
- develop
- master
permissions:
id-token: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Create zip
run: bash ZipCode.sh
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: '${{secrets.IAMROLE_GITHUB}}'
role-duration-seconds: 900 # the ttl of the session, in seconds.
aws-region: us-east-1 # u
- name: push Zip to s3
run: aws s3 cp /tmp/penny/penny.zip s3://'${{secrets.AWS_S3_BUCKET_NAME}}'/
env:
LOCAL_PATH: '/tmp/penny/'
AWS_S3_BUCKET: '${{secrets.AWS_S3_BUCKET_NAME}}'
- name: making zip public
run: aws s3api put-object-acl --acl public-read --bucket '${{secrets.AWS_S3_BUCKET_NAME}}' --key penny.zip
- name: push CFN to s3
run: aws s3 cp penny_pincher_cfn.yml s3://'${{secrets.AWS_S3_BUCKET_NAME}}'/
env:
AWS_S3_BUCKET: '${{secrets.AWS_S3_BUCKET_NAME}}'
- name: making CFN public
run: aws s3api put-object-acl --acl public-read --bucket '${{secrets.AWS_S3_BUCKET_NAME}}' --key penny_pincher_cfn.yml