Skip to content

feat: forge production deployment (#20) #61

feat: forge production deployment (#20)

feat: forge production deployment (#20) #61

Workflow file for this run

# storoku:ignore
name: Deploy
on:
push:
branches:
- main
pull_request:
branches: [main]
workflow_run:
workflows: [Releaser]
types: [completed]
branches: [main]
workflow_dispatch:
inputs:
environment:
type: choice
description: Environment
options:
- warm-staging
- forge-production
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
# apply staging on pushes to main, plan otherwise
warm-staging:
uses: ./.github/workflows/terraform.yml
with:
env: warm-staging
workspace: warm-staging
network: warm
did: did:web:staging.etracker.warm.storacha.network
apply: ${{ github.event_name != 'pull_request' }}
secrets:
aws-account-id: ${{ secrets.WARM_STAGING_AWS_ACCOUNT_ID }}
aws-region: ${{ secrets.WARM_STAGING_AWS_REGION }}
region: ${{ secrets.WARM_STAGING_AWS_REGION }}
private-key: ${{ secrets.WARM_STAGING_PRIVATE_KEY }}
metrics-auth-token: ${{ secrets.WARM_STAGING_METRICS_AUTH_TOKEN }}
admin-dashboard-user: ${{ secrets.WARM_STAGING_ADMIN_DASHBOARD_USER }}
admin-dashboard-password: ${{ secrets.WARM_STAGING_ADMIN_DASHBOARD_PASSWORD }}
cloudflare-zone-id: ${{ secrets.WARM_STAGING_CLOUDFLARE_ZONE_ID }}
cloudflare-api-token: ${{ secrets.WARM_STAGING_CLOUDFLARE_API_TOKEN }}
# apply prod on successful release, plan otherwise
forge-production:
uses: ./.github/workflows/terraform.yml
with:
env: forge-production
workspace: forge-prod
network: forge
did: did:web:etracker.forge.storacha.network
apply: ${{ (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'forge-production') }}
secrets:
aws-account-id: ${{ secrets.FORGE_PROD_AWS_ACCOUNT_ID }}
aws-region: ${{ secrets.FORGE_PROD_AWS_REGION }}
region: ${{ secrets.FORGE_PROD_AWS_REGION }}
private-key: ${{ secrets.FORGE_PROD_PRIVATE_KEY }}
metrics-auth-token: ${{ secrets.FORGE_PROD_METRICS_AUTH_TOKEN }}
admin-dashboard-user: ${{ secrets.FORGE_PROD_ADMIN_DASHBOARD_USER }}
admin-dashboard-password: ${{ secrets.FORGE_PROD_ADMIN_DASHBOARD_PASSWORD }}
cloudflare-zone-id: ${{ secrets.FORGE_PROD_CLOUDFLARE_ZONE_ID }}
cloudflare-api-token: ${{ secrets.FORGE_PROD_CLOUDFLARE_API_TOKEN }}