-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (47 loc) · 1.39 KB
/
deploy.yaml
File metadata and controls
53 lines (47 loc) · 1.39 KB
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
48
49
50
51
52
53
name: Deploy
on:
push:
branches:
- main
workflow_dispatch:
inputs:
action:
description: "Whether to deploy up or down"
required: true
default: "up"
type: choice
options:
- up
- down
stack:
description: "The stack to deploy up or down. (Leave blank for default)"
default: ""
jobs:
defang:
name: Defang ${{ github.event.inputs.action || 'up' }} ${{
github.event.inputs.stack || 'default stack' }}
environment: production
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
concurrency:
cancel-in-progress: false
group: deploy-${{ github.event.inputs.stack || 'default' }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Defang ${{ github.event.inputs.action || 'up' }} ${{
github.event.inputs.stack || 'default stack' }}
uses: DefangLabs/defang-github-action@v1.4.0
with:
command: ${{ github.event.inputs.action || 'up' }}
stack: ${{ github.event.inputs.stack || '' }}
config-env-vars: DATABASE_URL
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
- name: Deployment Summary
uses: DefangLabs/defang-github-action@v1.4.0
with:
command: services
stack: ${{ github.event.inputs.stack || '' }}