-
Notifications
You must be signed in to change notification settings - Fork 16
38 lines (32 loc) · 1.46 KB
/
deployment-dev.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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: S3 Dev Deployment
on:
workflow_dispatch:
inputs:
version:
description: 'The FormKiQ version number string to deploy.'
required: true
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: deploy to s3
env:
formKiQVersion: ${{ github.event.inputs.version }}
run: |
sam package --s3-prefix ${formKiQVersion} --s3-bucket formkiq-dev-distribution-us-east-2 --template-file template.yaml --region us-east-2 --output-template-file template-${formKiQVersion}.yaml
aws s3 cp template-${formKiQVersion}.yaml s3://formkiq-dev-distribution-us-east-2/${formKiQVersion}/template.yaml
aws s3 cp vpc.yaml s3://formkiq-dev-distribution-us-east-2/${formKiQVersion}/vpc.yaml