Refactor deployment script #21
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: Deploy Environment | ||
on: | ||
push: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: 'Environment to deploy to' | ||
type: choice | ||
required: true | ||
default: 'ops-preview-1' | ||
options: | ||
- ALL | ||
- LIVE | ||
- live-sanchonet@eu-central-1@v2 | ||
- DEV | ||
- live-mainnet@eu-central-1@v2 | ||
- live-sanchonet@us-east-2@v1 | ||
- dev-mainnet@us-east-1 | ||
- live-mainnet@us-east-2@v2 | ||
- live-sanchonet@us-east-2@v2 | ||
- dev-preprod@us-east-1@v2 | ||
- live-preprod@eu-central-1@v2 | ||
- OPS | ||
- dev-preview@us-east-1 | ||
- live-preprod@us-east-2@v2 | ||
- ops-preprod-1@us-east-1 | ||
- dev-sanchonet@us-east-1@v1 | ||
- live-preview@eu-central-1@v2 | ||
- ops-preview-1@us-east-1 | ||
- dev-sanchonet@us-east-1@v2 | ||
- live-preview@us-east-2@v2 | ||
- staging-preprod@us-east-1@v2 | ||
jobs: | ||
deploy: | ||
environment: ${{ inputs.environment || 'ops-preview-1@us-east-1' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 📥 Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: 🧰 Setup Nix | ||
uses: cachix/install-nix-action@v21 | ||
- name: 🚀 Deploy | ||
run: | | ||
Check failure on line 47 in .github/workflows/deploy-env.yaml GitHub Actions / Deploy EnvironmentInvalid workflow file
|
||
echo "${{ secrets.ENVRC }}" > .envrc.local | ||
source .envrc.local | ||
nix develop -L --command bash -c ' | ||
set -euo pipefail | ||
echo "yes" | nix run .#cardano-services.${{ inputs.environment || \'ops-preview-1@us-east-1\' }}.apply | ||
' |