Skip to content

Run Command

Run Command #7

Workflow file for this run

name: Run Command
on:
workflow_dispatch:
inputs:
environment:
description: "Environment to deploy to"
type: environment
required: true
command:
description: "Command to run"
type: string
required: true
env:
TZ: America/New_York
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
AWS_REGION: ${{ secrets.AWS_REGION }}
ENVIRONMENT: ${{ secrets.ENVIRONMENT }}
jobs:
RunCommand:
permissions:
contents: "read"
id-token: "write"
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ secrets.AWS_REGION }}
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
- run: npm install -g aws-cdk
- run: echo "${{ secrets.ENV_FILE }}" > infrastructure/.env
- run: ${{ inputs.command }}