Skip to content

Commit b2110b6

Browse files
authored
Merge pull request #216 from 0xPolygonID/develop
sync main from develop
2 parents 9604cd7 + 4076d61 commit b2110b6

35 files changed

+1139
-926
lines changed

.env.sample

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
ALGOLIA_API_KEY=213
2+
ALGOLIA_APP_ID=XYZ

.github/workflows/deployment_new_aws_account.yml

+13-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Polygon ID Docs Deployment
1+
name: Privado ID Docs Deployment
22

33
on:
44
push:
@@ -8,6 +8,7 @@ on:
88

99
env:
1010
AWS_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
11+
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
1112
ECR_REPOSITORY: devs-ecr
1213
ECS_SERVICE: devs-ecs-service
1314

@@ -26,8 +27,6 @@ jobs:
2627

2728
- name: Configure AWS credentials
2829
uses: aws-actions/configure-aws-credentials@v4
29-
env:
30-
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
3130
with:
3231
aws-region: ${{ env.AWS_REGION }}
3332
role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT_ID }}:role/PolygonIDActionsRole
@@ -36,26 +35,31 @@ jobs:
3635
- name: Login to Amazon ECR
3736
id: login-ecr
3837
uses: aws-actions/amazon-ecr-login@v1
39-
with:
40-
mask-password: 'true'
4138

4239
- name: Install dependencies
4340
run: rm -rf node_modules && npm ci
4441

4542
- name: Create .env file
46-
run: echo 'ALGOLIA_API_KEY=${{ secrets.ALGOLIA_API_KEY }}' >> .env
43+
run: |
44+
echo -e "ALGOLIA_API_KEY=${{ secrets.ALGOLIA_API_KEY }}" >> .env
45+
echo -e "ALGOLIA_APP_ID=${{ secrets.ALGOLIA_APP_ID }}" >> .env
46+
cat .env
4747
48-
# Runs a single command using the runners shell
4948
- name: Build
5049
run: npm run build
5150

51+
- name: Set ECR registry
52+
run: echo "ECR_REGISTRY=${{ steps.login-ecr.outputs.registry }}" >> $GITHUB_ENV
53+
5254
- name: Build, tag, and push image to Amazon ECR
5355
id: build-image
5456
env:
55-
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
57+
ECR_REGISTRY: ${{ env.ECR_REGISTRY }}
5658
IMAGE_TAG: ${{ github.sha }}
5759
run: |
58-
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
60+
echo "Using ECR_REGISTRY=$ECR_REGISTRY"
61+
echo "Using IMAGE_TAG=$IMAGE_TAG"
62+
docker build --cache-from $ECR_REGISTRY/$ECR_REPOSITORY:latest -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
5963
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
6064
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
6165

.github/workflows/prod_deployment.yml

-82
This file was deleted.

.github/workflows/staging_deployment.yml

-82
This file was deleted.

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ COPY nginx.conf /etc/nginx/conf.d/default.conf
1111
EXPOSE 80
1212

1313
# Start NGINX
14-
CMD ["nginx", "-g", "daemon off;"]
14+
CMD ["nginx", "-g", "daemon off;"]

0 commit comments

Comments
 (0)