-
Notifications
You must be signed in to change notification settings - Fork 30
52 lines (47 loc) · 1.77 KB
/
devnet-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: (develop) Manual devnet deploy
on:
schedule:
- cron: '0 0 * * *' # Runs daily at midnight UTC
workflow_dispatch:
push:
branches:
- develop
paths:
- '.github/workflows/devnet-deploy.yml'
permissions:
id-token: write
contents: read
env:
REGISTRY: "599564732950.dkr.ecr.us-east-2.amazonaws.com"
REPOSITORY: "starknet-remix-plugin"
DEV_CLUSTER: "starknet-remix-plugin-ecs-cluster"
DEV_SERVICE_NAME: "devnet-development-svc"
PROD_CLUSTER: "starknet-remix-plugin-production-ecs-cluster"
PROD_SERVICE_NAME: "devnet-production-svc"
jobs:
Deploy_Dev:
runs-on: ubuntu-latest
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: us-east-2
role-to-assume: arn:aws:iam::599564732950:role/Aws-GH-Action-Assume-Role-Starknet
role-session-name: GHStarknet
- name: Download task definition
run: |
aws ecs describe-task-definition --task-definition starknet-remix-development-devnet --query taskDefinition > task-definition.json
- name: Update the task definition to use the image from Docker Hub
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
container-name: "devnet"
image: shardlabs/starknet-devnet-rs:latest
- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: ${{ env.DEV_SERVICE_NAME }}
cluster: ${{ env.DEV_CLUSTER }}
wait-for-service-stability: true