S3 Dev Deployment #134
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: | |
S3_BUCKET: ${{ secrets.S3_BUCKET }} | |
formKiQVersion: ${{ github.event.inputs.version }} | |
run: | | |
aws s3 cp s3://${S3_BUCKET}/formkiq-core/formkiq-core-${formKiQVersion}.zip . | |
unzip formkiq-core* | |
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 |