From d425c18d5bf734de62e95e46de3940c99400a6ca Mon Sep 17 00:00:00 2001 From: Siddharth Rawat Date: Tue, 9 Jan 2024 20:08:50 -0500 Subject: [PATCH] fix: update README to inculde validate CI pipeline status --- .github/workflows/packer-build.yml | 15 +++++---------- README.md | 2 +- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/packer-build.yml b/.github/workflows/packer-build.yml index dcac431..53193c6 100644 --- a/.github/workflows/packer-build.yml +++ b/.github/workflows/packer-build.yml @@ -49,7 +49,6 @@ jobs: echo DBUSER=${{ vars.DBUSER }} >> .env echo DBPASSWORD=${{ secrets.DBPASSWORD }} >> .env zip -r webapp.zip ./ - pwd ./webapp - name: Packer variables run: | @@ -69,11 +68,11 @@ jobs: echo device_name=\"${{ vars.DEVICE_NAME}}\" >> ami.pkrvars.hcl - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1-node16 + uses: aws-actions/configure-aws-credentials@v4 with: aws-access-key-id: ${{ secrets.AWS_DEV_ACCESS_KEY }} aws-secret-access-key: ${{ secrets.AWS_DEV_SECRET_KEY }} - aws-region: ${{ secrets.AWS_REGION }} + aws-region: ${{ vars.AWS_REGION }} - name: Setup `packer` uses: hashicorp/setup-packer@main @@ -81,24 +80,20 @@ jobs: with: version: "latest" - - name: Packer format - id: fmt - run: "packer fmt ." - - name: Packer init, format validate and build custom AMI run: | - cd aws/packer/ + cd aws/packer && packer fmt . packer init ami.pkr.hcl packer validate -evaluate-datasources --var-file=ami.pkrvars.hcl ami.pkr.hcl packer build --var-file=ami.pkrvars.hcl ami.pkr.hcl - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1-node16 + uses: aws-actions/configure-aws-credentials@v4 with: aws-access-key-id: ${{ secrets.AWS_PROD_ACCESS_KEY }} aws-secret-access-key: ${{ secrets.AWS_PROD_SECRET_KEY }} - aws-region: ${{ secrets.AWS_REGION }} + aws-region: ${{ vars.AWS_REGION }} - name: Instance Refresh automation run: | sudo apt-get install jq diff --git a/README.md b/README.md index 3cb6dc4..135e6c8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # REST API -[![Release](https://github.com/sydrawat01/rest-api/actions/workflows/release.yml/badge.svg)](https://github.com/sydrawat01/rest-api/actions/workflows/release.yml) [![Unit Tests](https://github.com/sydrawat01/rest-api/actions/workflows/unit-test.yml/badge.svg)](https://github.com/sydrawat01/rest-api/actions/workflows/unit-test.yml) +[![Release](https://github.com/sydrawat01/rest-api/actions/workflows/release.yml/badge.svg)](https://github.com/sydrawat01/rest-api/actions/workflows/release.yml) [![Unit Tests](https://github.com/sydrawat01/rest-api/actions/workflows/unit-test.yml/badge.svg)](https://github.com/sydrawat01/rest-api/actions/workflows/unit-test.yml) [![Packer AMI template validation](https://github.com/sydrawat01/rest-api/actions/workflows/packer-validate.yml/badge.svg)](https://github.com/sydrawat01/rest-api/actions/workflows/packer-validate.yml) This is a basic skeleton code to create a basic REST API using NodeJS, ExpressJS and Babel.