Skip to content

Commit d889c36

Browse files
committed
Refactor workflow
1 parent ef30944 commit d889c36

File tree

1 file changed

+27
-22
lines changed

1 file changed

+27
-22
lines changed

.github/workflows/deploy-env.yaml

+27-22
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Deploy Environment
22

33
on:
4+
push:
45
workflow_dispatch:
56
inputs:
67
environment:
@@ -10,39 +11,43 @@ on:
1011
default: 'ops-preview-1'
1112
options:
1213
options:
13-
- ops-preview-1
14-
region:
15-
description: 'Region containing cluster to deploy to'
16-
type: choice
17-
required: true
18-
default: 'us-east-1'
19-
options:
20-
- us-east-1
21-
- us-east-2
22-
- eu-central-1
14+
- ALL
15+
- LIVE
16+
- live-sanchonet@eu-central-1@v2
17+
- DEV
18+
- live-mainnet@eu-central-1@v2
19+
- live-sanchonet@us-east-2@v1
20+
- dev-mainnet@us-east-1
21+
- live-mainnet@us-east-2@v2
22+
- live-sanchonet@us-east-2@v2
23+
- dev-preprod@us-east-1@v2
24+
- live-preprod@eu-central-1@v2
25+
- OPS
26+
- dev-preview@us-east-1
27+
- live-preprod@us-east-2@v2
28+
- ops-preprod-1@us-east-1
29+
- dev-sanchonet@us-east-1@v1
30+
- live-preview@eu-central-1@v2
31+
- ops-preview-1@us-east-1
32+
- dev-sanchonet@us-east-1@v2
33+
- live-preview@us-east-2@v2
34+
- staging-preprod@us-east-1@v2
2335

2436
jobs:
2537
deploy:
26-
environment: ${{ inputs.environment }}
38+
environment: ${{ inputs.environment || ops-preview-1 }}
2739
runs-on: ubuntu-latest
2840
steps:
2941
- name: 📥 Checkout repository
3042
uses: actions/checkout@v3
3143

32-
- name: Install QEMU
33-
run: sudo apt-get install -y qemu-user-static
34-
3544
- name: 🧰 Setup Nix
3645
uses: cachix/install-nix-action@v21
37-
with:
38-
extra_nix_config: |
39-
system = aarch64-linux
4046

4147
- name: 🚀 Deploy
4248
run: |
43-
echo "${{ secrets.ENVRC }}" > .envrc
44-
source .envrc
49+
echo "${{ secrets.ENVRC }}" > .envrc.local
4550
nix develop
46-
nix run .#cardano-services.${{ inputs.environment }}@${{ inputs.region }}.status
47-
nix run .#cardano-services.${{ inputs.environment }}@${{ inputs.region }}.plan
48-
nix run .#cardano-services.${{ inputs.environment }}@${{ inputs.region }}.apply -y
51+
nix run .#cardano-services.${{ inputs.environment }}.status
52+
nix run .#cardano-services.${{ inputs.environment }}.plan
53+
echo "yes" | nix run .#cardano-services.${{ inputs.environment }}.apply

0 commit comments

Comments
 (0)