docker latest image pushed integration #15
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
name: Development deployment from Github to AWS | |
on: | |
push: | |
branches: | |
- testing | |
jobs: | |
deploy-docker-image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Latest Repo | |
uses: actions/checkout@master | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: Dockerfile | |
push: true | |
tags: siddharth9903/seistart:latest | |
deploy-docker-image-to-aws-eb: | |
needs: deploy-docker-image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-skip-session-tagging: true | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ap-south-1 | |
- name: Deploy to Elastic Beanstalk | |
run: | | |
aws elasticbeanstalk create-application-version --application-name Gateway --version-label $GITHUB_SHA --source-bundle S3Bucket=docker-login-bucket-seistart,S3Key=Dockerrun.aws.json | |
aws elasticbeanstalk update-environment --application-name Gateway --environment-name seistart-docker-dev --version-label $GITHUB_SHA |