-
Notifications
You must be signed in to change notification settings - Fork 5
74 lines (71 loc) · 2.38 KB
/
deploy.yml
File metadata and controls
74 lines (71 loc) · 2.38 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: deploy
on: deployment
jobs:
deploy:
runs-on: ubuntu-latest
# These permissions are needed for AWS GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
env:
K8S_ENV: ${{ github.event.deployment.environment }}
IMAGE_TAG: ${{ github.event.deployment.payload.tag }}
METABLOCK_API_TOKEN: ${{ secrets.METABLOCK_API_TOKEN }}
RUST_LOG: info
steps:
- name: Update deployment status (in_progress)
if: success()
uses: chrnorm/deployment-status@v2
with:
token: "${{ secrets.TOKEN_DEPLOYMENT }}"
deployment-id: ${{ github.event.deployment.id }}
state: "in_progress"
- name: checkout repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.deployment.sha }}
- name: checkout vars
uses: actions/checkout@v4
with:
repository: quantmind/metaplatform
path: metaplatform
token: ${{ secrets.TOKEN_DEPLOYMENT }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::337900243020:role/GithubActions
aws-region: eu-west-1
- name: install rops
uses: quantmind/rops/.github/actions/setup-rops@main
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_DEPLOYMENT }}
- name: Install mozilla sops
uses: mdgreenwald/mozilla-sops-action@v1.4.1
- name: deploy quantflow
run: |
rops charts update
rops charts deploy \
quantflow \
--env ${K8S_ENV} \
--set image.tag=${IMAGE_TAG} \
--wait
- name: Update ingress configuration
uses: quantmind/metablock-ingress@v3
with:
token: ${{ secrets.METABLOCK_API_TOKEN }}
space: quantmind
path: dev/blocks
- name: Update deployment status (success)
if: success()
uses: chrnorm/deployment-status@v2
with:
token: "${{ secrets.TOKEN_DEPLOYMENT }}"
deployment-id: ${{ github.event.deployment.id }}
state: "success"
- name: Update deployment status (failure)
if: failure()
uses: chrnorm/deployment-status@v2
with:
token: "${{ secrets.TOKEN_DEPLOYMENT }}"
deployment-id: ${{ github.event.deployment.id }}
state: "failure"