[feat] added express rest API route for fetching latest room files state #6
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: "Publish the image to Docker Hub and Deploy to AWS" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PWD }} | ||
- name: Build and Push Docker Image | ||
run: | | ||
docker-compose -f docker-compose.prod.yml build | ||
docker-compose -f docker-compose.prod.yml push | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ap-south-1 | ||
- name: Setup terraform | ||
uses: hashicorp/setup-terraform@v2 | ||
with: | ||
terraform_version: 1.5.0 | ||
terraform_working_dir: ./terraform | ||
- name: Terraform init | ||
working_directory: ./terraform | ||
Check failure on line 43 in .github/workflows/build-and-deploy.yml GitHub Actions / Publish the image to Docker Hub and Deploy to AWSInvalid workflow file
|
||
run: terraform init | ||
- name: Terraform plan | ||
working_directory: ./terraform | ||
run: terraform plan | ||
- name: Terraform apply | ||
working_directory: ./terraform | ||
run: terraform apply -auto-approve | ||