Skip to content

Commit

Permalink
feat: add cdelivery and cdeployment workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
victorggonzalez committed Jul 15, 2022
1 parent e87f248 commit 7da59ae
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/cdelivery-s3-apps-caller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy to staging environment

# Controls when the action will run
on:
# Triggers the workflow on repository-dispatch event
repository_dispatch:
types: [staging-deployment]

# This workflow is made up of one job that calls the reusable workflow in graasp-deploy
jobs:
graasp-deploy-s3-apps-workflow:
# Replace with repository name
name: CD caller template
# Replace 'main' with the hash of a commit, so it points to an specific version of the reusable workflow that is used
# Reference reusable workflow file. Using the commit SHA is the safest for stability and security
uses: graasp/graasp-deploy/.github/workflows/cdelivery-s3-apps.yml@7b5dd84304458c3c5ab03cbbde059670f77b1687
# Replace input build-folder or version if needed
with:
build-folder: 'build'
version: 'latest'
tag: ${{ github.event.client_payload.tag }}
# Insert required secrets based on repository with the following format: ${{ secrets.SECRET_NAME }}
secrets:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_STAGE }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_STAGE }}
aws-region: ${{ secrets.APPS_AWS_REGION }}
aws-s3-bucket-name: ${{ secrets.AWS_S3_BUCKET_NAME_APPS_STAGE }}
cloudfront-distribution-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_APPS_STAGE }}
app-id: ${{ secrets.APP_ID }}
graasp-domain: ${{ secrets.STAGE_GRAASP_DOMAIN }}
30 changes: 30 additions & 0 deletions .github/workflows/cdeployment-s3-apps-caller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy to production environment

# Controls when the action will run
on:
# Triggers the workflow on repository-dispatch event
repository_dispatch:
types: [production-deployment]

# This workflow is made up of one job that calls the reusable workflow in graasp-deploy
jobs:
graasp-deploy-s3-apps-workflow:
# Replace with repository name
name: CD caller template
# Replace 'main' with the hash of a commit, so it points to an specific version of the reusable workflow that is used
# Reference reusable workflow file. Using the commit SHA is the safest for stability and security
uses: graasp/graasp-deploy/.github/workflows/cdeployment-s3-apps.yml@7b5dd84304458c3c5ab03cbbde059670f77b1687
# Replace input build-folder or version if needed.
with:
build-folder: 'build'
version: 'latest'
tag: ${{ github.event.client_payload.tag }}
# Insert required secrets based on repository with the following format: ${{ secrets.SECRET_NAME }}
secrets:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_PROD }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_PROD }}
aws-region: ${{ secrets.APPS_AWS_REGION }}
aws-s3-bucket-name: ${{ secrets.AWS_S3_BUCKET_NAME_APPS_PROD }}
cloudfront-distribution-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_APPS_PROD }}
app-id: ${{ secrets.APP_ID }}
graasp-domain: ${{ secrets.PROD_GRAASP_DOMAIN }}

0 comments on commit 7da59ae

Please sign in to comment.