Skip to content

Commit

Permalink
remove reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jaroldwong committed Dec 6, 2023
1 parent c3920a8 commit 838aefb
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions .github/workflows/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,35 @@ on:
name: Push image to ECR and force new ECS deploy

jobs:
setup:
deploy:
name: Deploy
runs-on: ubuntu-latest

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

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2

- name: Copy regional certificate bundle
run: 'echo $RDS_US_WEST_2_BUNDLE_PEM | base64 -d > us-west-2-bundle.pem'
shell: bash
env:
RDS_US_WEST_2_BUNDLE_PEM: ${{secrets.RDS_US_WEST_2_BUNDLE_PEM}}

deploy:
needs: setup
uses: ucdavis-lsit/actions/.github/workflows/deploy.yml@main
with:
repo: 'ipa-web-prod'
cluster: 'legacy'
service: 'ipa-web-prod'
secrets:
access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Build and redeploy
uses: jaroldwong/ecr-push-and-ecs-deploy@v1
with:
ecr-registry: ${{ steps.login-ecr.outputs.registry }}
ecr-repository: 'ipa-web-prod'
ecs-cluster: 'legacy'
ecs-service: 'ipa-web-prod'

0 comments on commit 838aefb

Please sign in to comment.