chore: use usdc/usd price feed for usv (#75) #9
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: CD | |
on: | |
push: | |
branches: | |
- main | |
env: | |
AWS_REGION: eu-west-2 | |
ECR_REPOSITORY: 350549900615.dkr.ecr.eu-west-2.amazonaws.com/graph-node | |
ECS_SERVICE: arn:aws:ecs:eu-west-2:350549900615:service/prod-cluster/prod-service-graph | |
ECS_CLUSTER: arn:aws:ecs:eu-west-2:350549900615:cluster/prod-cluster | |
ECS_TASK_DEFINITION: ./repoPath/.aws/task-definition.json | |
CONTAINER_NAME: prod-graph-node | |
IMAGE_TAG: latest | |
permissions: | |
id-token: write | |
contents: read # This is required for actions/checkout@v2 | |
jobs: | |
cd: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
ref: ${{ github.event.pull_request.head.ref }} | |
path: './repoPath/' | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-region: eu-west-2 | |
role-to-assume: arn:aws:iam::350549900615:role/deploy | |
role-session-name: OIDCSession | |
- name: ECS task definition with first container | |
id: graph-container | |
uses: aws-actions/amazon-ecs-render-task-definition@v1 | |
with: | |
task-definition: ${{ env.ECS_TASK_DEFINITION }} | |
container-name: prod-graph-node | |
image: graphprotocol/graph-node:v0.25.0 | |
- name: ECS task definition with second container | |
id: deploy-container | |
uses: aws-actions/amazon-ecs-render-task-definition@v1 | |
with: | |
task-definition: ${{ steps.graph-container.outputs.task-definition }} | |
container-name: prod-subgraph-deploy | |
image: 350549900615.dkr.ecr.eu-west-2.amazonaws.com/subgraph-deploy:latest | |
- name: Deploy to Amazon ECS service | |
uses: aws-actions/amazon-ecs-deploy-task-definition@v1 | |
with: | |
task-definition: ${{ steps.deploy-container.outputs.task-definition }} | |
service: ${{ env.ECS_SERVICE }} | |
cluster: ${{ env.ECS_CLUSTER }} |