forked from akash-network/console
-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (109 loc) · 3.14 KB
/
console-api-release.yml
File metadata and controls
117 lines (109 loc) · 3.14 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Deploy API
on:
workflow_dispatch:
inputs:
image_tag:
description: "Image tag to deploy (e.g., latest, 1.0.0, v1.0.0)"
required: false
type: string
cancel-if-stale:
description: "Cancel this deployment if a newer version is already queued, running, or recently deployed"
required: false
type: boolean
default: false
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false # don't cancel deployments!
jobs:
setup:
uses: ./.github/workflows/reusable-deploy-setup.yml
with:
app: console-api
image_tag: ${{ inputs.image_tag || github.ref_name }}
cancel-if-stale: ${{ inputs.cancel-if-stale == 'true' }}
deploy-beta-mainnet:
permissions:
contents: read
pull-requests: read
deployments: write
needs: setup
if: ${{ !needs.setup.outputs.skip }}
name: Deploy to beta mainnet
uses: ./.github/workflows/reusable-deploy-k8s.yml
secrets: inherit
with:
app: console-api
appVersion: ${{ needs.setup.outputs.image_tag }}
environment: staging
chain: mainnet
deploy-beta-sandbox:
permissions:
contents: read
pull-requests: read
deployments: write
needs: setup
if: ${{ !needs.setup.outputs.skip }}
name: Deploy to beta sandbox
uses: ./.github/workflows/reusable-deploy-k8s.yml
secrets: inherit
with:
app: console-api
appVersion: ${{ needs.setup.outputs.image_tag }}
environment: staging
chain: sandbox
test-beta-sandbox:
permissions:
contents: read
pull-requests: read
needs:
- setup
- deploy-beta-sandbox
name: Test beta sandbox
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/run-e2e-tests
env:
TEST_API_BASE_URL: ${{ vars.CONSOLE_WEB_BETA_URL }}/api-sandbox
CONSOLE_API_E2E_API_KEY: ${{ secrets.CONSOLE_API_E2E_BETA_SANDBOX_API_KEY }}
with:
app: api
app-version: ${{ needs.setup.outputs.image_tag }}
app-url: ${{ vars.CONSOLE_WEB_BETA_URL }}/api-sandbox
environment: staging
chain: sandbox
slack-webhook-url: ${{ secrets.FAILED_E2E_TESTS_SLACK_WEBHOOK_URL }}
gh-user-to-slack-user: ${{ vars.GH_USER_TO_SLACK_USER }}
deploy-prod-mainnet:
permissions:
contents: read
pull-requests: read
deployments: write
needs:
- setup
- deploy-beta-mainnet
- test-beta-sandbox
name: Deploy to prod mainnet
uses: ./.github/workflows/reusable-deploy-k8s.yml
secrets: inherit
with:
app: console-api
appVersion: ${{ needs.setup.outputs.image_tag }}
environment: prod
chain: mainnet
deploy-prod-sandbox:
permissions:
contents: read
pull-requests: read
deployments: write
needs:
- setup
- test-beta-sandbox
name: Deploy to prod sandbox
uses: ./.github/workflows/reusable-deploy-k8s.yml
secrets: inherit
with:
app: console-api
appVersion: ${{ needs.setup.outputs.image_tag }}
environment: prod
chain: sandbox