Skip to content

feat: add new files and update dependencies #5

feat: add new files and update dependencies

feat: add new files and update dependencies #5

# name: build & deploy to PROD environment
# on:
# workflow_dispatch:
# push:
# tags:
# - v[0-9].[0-9]+.[0-9]+
# env:
# APP_ENV: production
# AWS_REGION: us-west-2
# ECR_REPOSITORY: united-market-service
# ECS_SERVICE: united-market-service
# ECS_CLUSTER: flip-god
# ECS_TASK_DEFINITION: .aws/ecs/task-definition.json
# CONTAINER_NAME: app
# jobs:
# deploy:
# runs-on: ubuntu-latest
# # environment: production
# steps:
# - uses: actions/checkout@v3
# - name: Make envfile
# uses: SpicyPizza/[email protected]
# with:
# directory: .env/
# file_name: .env.prod
# fail_on_empty: false
# envkey_APP_ID: ums
# envkey_BASE_PATH: ${{secrets.SERVER_BASEPATH}}
# envkey_LOG_LEVEL: ${{secrets.SERVER_LOGLEVEL}}
# envkey_MONGO_URI: ${{secrets.MONGO_URI}}
# envkey_AUTH_SECRET: ${{secrets.AUTH_SECRET}}
# envkey_SERVICE_TOKEN: ${{secrets.SERVICE_TOKEN}}
# envkey_NFT_METADATA_URL: ${{secrets.USER_NFT_LIST_URL}}
# envkey_MA_URL: ${{secrets.MA_URL}}
# envkey_CCS_URL: ${{vars.CCS_URL}}
# envkey_EMS_URL: ${{vars.EMS_URL}}
# envkey_USERS_URL: ${{vars.USERS_URL}}
# envkey_ADMIN_USERNAME: ${{secrets.ADMIN_USERNAME}}
# envkey_ADMIN_PASSWORD: ${{secrets.ADMIN_PASSWORD}}
# envkey_ALCHEMY_API_KEY: ${{secrets.ALCHEMY_API_KEY}}
# envkey_ETHERSCAN_API_KEY: ${{secrets.ETHERSCAN_API_KEY}}
# envkey_INFURA_API_KEY: ${{secrets.INFURA_API_KEY}}
# envkey_RPC_FLASHBOTS: ${{vars.RPC_FLASHBOTS}}
# envkey_OPENSEA_APIKEY: ${{secrets.OPENSEA_APIKEY}}
# envkey_HONEYCOMB_API_KEY: ${{secrets.HONEYCOMB_API_KEY}}
# # server_auth_algs: ${{secrets.SERVER_AUTH_ALGS}}
# # server_auth_pk: ${{secrets.SERVER_AUTH_PK}}
# # server_auth_aud: ${{secrets.SERVER_AUTH_AUD}}
# # server_auth_iss: ${{secrets.SERVER_AUTH_ISS}}
# # database_mongo_name: ${{secrets.MONGO_DB_NAME}}
# # database_mongo_uri: ${{secrets.MONGO_URI}}
# # server_cors_origin: ${{secrets.CORS_ORIGIN}}
# # server_cors_credentials: ${{secrets.CORS_CRED}}
# # server_cors_methods: ${{secrets.CORS_METHODS}}
# # server_cors_headers: ${{secrets.CORS_HEADERS}}
# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@13d241b293754004c80624b5567555c4a39ffbe3
# with:
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws-region: ${{ env.AWS_REGION }}
# - name: Login to Amazon ECR
# id: login-ecr
# uses: aws-actions/amazon-ecr-login@aaf69d68aa3fb14c1d5a6be9ac61fe15b48453a2
# - name: Build, tag, and push image to Amazon ECR
# id: build-image
# env:
# ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
# IMAGE_TAG: ${{ github.sha }}
# NODE_ENV: ${{env.APP_ENV}}
# run: |
# # Build a docker container and
# # push it to ECR so that it can
# # be deployed to ECS.
# docker build --build-arg NODE_ENV=$NODE_ENV -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
# docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
# echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
# - name: Fill in the new image ID in the Amazon ECS task definition
# id: task-def
# uses: aws-actions/[email protected]
# with:
# task-definition: ${{ env.ECS_TASK_DEFINITION }}
# container-name: ${{ env.CONTAINER_NAME }}
# image: ${{ steps.build-image.outputs.image }}
# - name: Deploy Amazon ECS task definition
# uses: aws-actions/[email protected]
# with:
# task-definition: ${{ steps.task-def.outputs.task-definition }}
# service: ${{ env.ECS_SERVICE }}
# cluster: ${{ env.ECS_CLUSTER }}
# wait-for-service-stability: true