Skip to content
This repository was archived by the owner on Apr 20, 2026. It is now read-only.

Commit 637776f

Browse files
committed
Update workflow from canonical template
1 parent f4d4fb4 commit 637776f

1 file changed

Lines changed: 39 additions & 12 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,51 @@ on:
44
push:
55
branches:
66
- main
7+
workflow_dispatch:
8+
inputs:
9+
action:
10+
description: "Whether to deploy up or down"
11+
required: true
12+
default: "up"
13+
type: choice
14+
options:
15+
- up
16+
- down
17+
stack:
18+
description: "The stack to deploy up or down. (Leave blank for default)"
19+
default: ""
720

821
jobs:
9-
deploy:
10-
environment: playground
22+
defang:
23+
name: Defang ${{ github.event.inputs.action || 'up' }} ${{
24+
github.event.inputs.stack || 'default stack' }}
25+
environment: production
1126
runs-on: ubuntu-latest
1227
permissions:
1328
contents: read
1429
id-token: write
1530

31+
concurrency:
32+
cancel-in-progress: false
33+
group: deploy-${{ github.event.inputs.stack || 'default' }}
34+
1635
steps:
17-
- name: Checkout Repo
18-
uses: actions/checkout@v4
36+
- name: Checkout Repo
37+
uses: actions/checkout@v4
38+
39+
- name: Defang ${{ github.event.inputs.action || 'up' }} ${{
40+
github.event.inputs.stack || 'default stack' }}
41+
uses: DefangLabs/defang-github-action@v1.4.0
42+
with:
43+
command: ${{ github.event.inputs.action || 'up' }}
44+
stack: ${{ github.event.inputs.stack || '' }}
45+
config-vars-init-random: DJANGO_SECRET_KEY POSTGRES_PASSWORD
46+
env:
47+
DJANGO_SECRET_KEY: ${{ secrets.DJANGO_SECRET_KEY }}
48+
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
1949

20-
- name: Deploy
21-
uses: DefangLabs/defang-github-action@v1.1.3
22-
with:
23-
config-env-vars: DJANGO_SECRET_KEY POSTGRES_PASSWORD SSL_MODE
24-
env:
25-
DJANGO_SECRET_KEY: ${{ secrets.DJANGO_SECRET_KEY }}
26-
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
27-
SSL_MODE: ${{ secrets.SSL_MODE }}
50+
- name: Deployment Summary
51+
uses: DefangLabs/defang-github-action@v1.4.0
52+
with:
53+
command: services
54+
stack: ${{ github.event.inputs.stack || '' }}

0 commit comments

Comments
 (0)