Skip to content

Commit

Permalink
Add Deploy to TEST and PROD
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronaldo Macapobre committed Aug 22, 2024
1 parent 6c8144d commit e350a7d
Showing 1 changed file with 57 additions and 22 deletions.
79 changes: 57 additions & 22 deletions .github/workflows/app-vue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,25 +96,60 @@ jobs:
image_name: ${{ env.IMAGE_NAME }}
image_digest: ${{ needs.build.outputs.image_digest }}

# deploy2test:
# name: Deploy to TEST
# needs: [build, deploy2dev]
# env:
# ENVIRONMENT: test
# permissions:
# packages: write
# runs-on: ubuntu-latest
# environment: test

# steps:
# - name: Checkout
# uses: actions/checkout@v4

# - name: Deploy to ${{ env.ENVIRONMENT }}
# uses: ./.github/worflows/actions/deploy-to-aws
# with:
# environment: ${{ env.ENVIRONMENT }}
# ghcr_token: ${{ secrets.GITHUB_TOKEN }}
# github_image_repo: ${{ env.GITHUB_IMAGE_REPO }}
# image_name: ${{ env.IMAGE_NAME }}
# image_digest: ${{ needs.build.outputs.image_digest }}
deploy2test:
name: Deploy to TEST
needs: [build, deploy2dev]
env:
ENVIRONMENT: test
permissions:
id-token: write
packages: write
runs-on: ubuntu-latest
environment: test

steps:
- name: Checkout
uses: actions/checkout@v4

# Uncomment when infra in AWS in TEST environment has been configured
# - name: Deploy to ${{ env.ENVIRONMENT }}
# uses: ./.github/workflows/actions/deploy-to-aws
# with:
# environment: ${{ env.ENVIRONMENT }}
# aws_account: ${{ vars.AWS_ACCOUNT }}
# region: ${{ vars.AWS_REGION }}
# app_name: ${{ vars.APP_NAME }}
# aws_role_arn: ${{ vars.AWS_ROLE_ARN }}
# ghcr_token: ${{ secrets.GITHUB_TOKEN }}
# github_image_repo: ${{ env.GITHUB_IMAGE_REPO }}
# image_name: ${{ env.IMAGE_NAME }}
# image_digest: ${{ needs.build.outputs.image_digest }}

deploy2prod:
name: Deploy to PROD
needs: [build, deploy2dev, deploy2test]
env:
ENVIRONMENT: prod
permissions:
id-token: write
packages: write
runs-on: ubuntu-latest
environment: prod

steps:
- name: Checkout
uses: actions/checkout@v4

# Uncomment when infra in AWS in PROD environment has been configured
# - name: Deploy to ${{ env.ENVIRONMENT }}
# uses: ./.github/workflows/actions/deploy-to-aws
# with:
# environment: ${{ env.ENVIRONMENT }}
# aws_account: ${{ vars.AWS_ACCOUNT }}
# region: ${{ vars.AWS_REGION }}
# app_name: ${{ vars.APP_NAME }}
# aws_role_arn: ${{ vars.AWS_ROLE_ARN }}
# ghcr_token: ${{ secrets.GITHUB_TOKEN }}
# github_image_repo: ${{ env.GITHUB_IMAGE_REPO }}
# image_name: ${{ env.IMAGE_NAME }}
# image_digest: ${{ needs.build.outputs.image_digest }}

0 comments on commit e350a7d

Please sign in to comment.