Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update README to inculde validate CI pipeline status #23

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .github/workflows/packer-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -69,36 +68,32 @@ 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
id: setup
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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down