refactor: Finance perf base tables (#18) #312
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: Serverless Prod Deployment | |
on: | |
push: | |
branches: | |
- "main" | |
- "master" | |
concurrency: | |
# Cancel in-progress deploys to main branch | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
DAGSTER_CLOUD_URL: "http://llama.dagster.cloud" | |
DAGSTER_CLOUD_API_TOKEN: ${{ secrets.DAGSTER_CLOUD_API_TOKEN }} | |
# ENABLE_FAST_DEPLOYS: 'true' | |
# PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: "python" | |
jobs: | |
dagster_cloud_default_deploy: | |
name: Dagster Serverless Deploy | |
runs-on: ubuntu-20.04 | |
outputs: | |
build_info: ${{ steps.parse-workspace.outputs.build_info }} | |
steps: | |
- name: Parse cloud workspace | |
if: env.ENABLE_FAST_DEPLOYS != 'true' | |
id: parse-workspace | |
uses: dagster-io/dagster-cloud-action/actions/utils/parse_workspace@v0.1 | |
with: | |
dagster_cloud_file: dagster_cloud.yaml | |
- name: Checkout | |
if: env.ENABLE_FAST_DEPLOYS == 'true' | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
path: project-repo | |
- name: Build and deploy Python executable | |
if: env.ENABLE_FAST_DEPLOYS == 'true' | |
uses: dagster-io/dagster-cloud-action/actions/build_deploy_python_executable@pex-v0.1 | |
with: | |
dagster_cloud_file: "$GITHUB_WORKSPACE/project-repo/dagster_cloud.yaml" | |
build_output_dir: "$GITHUB_WORKSPACE/build" | |
python_version: "3.10" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
dagster_cloud_docker_deploy: | |
name: Dagster Serverless Docker Deploy | |
runs-on: ubuntu-20.04 | |
if: needs.dagster_cloud_default_deploy.outputs.build_info | |
needs: dagster_cloud_default_deploy | |
strategy: | |
fail-fast: false | |
matrix: | |
location: ${{ fromJSON(needs.dagster_cloud_default_deploy.outputs.build_info) }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Build and deploy to Dagster Cloud serverless | |
uses: dagster-io/dagster-cloud-action/actions/serverless_prod_deploy@v0.1 | |
with: | |
dagster_cloud_api_token: ${{ secrets.DAGSTER_CLOUD_API_TOKEN }} | |
location: ${{ toJson(matrix.location) }} | |
# Uncomment to pass through Github Action secrets as a JSON string of key-value pairs | |
# env_vars: ${{ toJson(secrets) }} | |
base_image: "python:3.10-slim" | |
organization_id: ${{ secrets.ORGANIZATION_ID }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |