-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.42 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Serverless Prod Deployment
on:
push:
branches:
- "main"
concurrency:
# Cancel in-progress deploys to main branch
group: ${{ github.ref }}
cancel-in-progress: true
env:
DAGSTER_CLOUD_URL: ${{ secrets.DAGSTER_CLOUD_URL }}
DAGSTER_CLOUD_API_TOKEN: ${{ secrets.DAGSTER_CLOUD_API_TOKEN }}
jobs:
parse_workspace:
runs-on: ubuntu-latest
outputs:
build_info: ${{ steps.parse-workspace.outputs.build_info }}
steps:
- uses: actions/checkout@v3
- name: Parse cloud workspace
id: parse-workspace
uses: dagster-io/dagster-cloud-action/actions/utils/parse_workspace@v0.1
with:
dagster_cloud_file: dagster_cloud.yaml
dagster_cloud_build_push:
runs-on: ubuntu-latest
needs: parse_workspace
name: Dagster Serverless Deploy
strategy:
fail-fast: false
matrix:
location: ${{ fromJSON(needs.parse_workspace.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) }}
env_vars: ${{ toJson(secrets) }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}