Skip to content

Commit 456dea9

Browse files
committed
Update workflow from canonical template
1 parent 366824c commit 456dea9

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/defang.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Defang
2+
3+
on:
4+
push:
5+
branches:
6+
- 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: ""
20+
21+
jobs:
22+
defang:
23+
name: Defang ${{ github.event.inputs.action || 'up' }} ${{
24+
github.event.inputs.stack || 'default stack' }}
25+
environment: defang-production
26+
runs-on: ubuntu-latest
27+
permissions:
28+
contents: read
29+
id-token: write
30+
31+
concurrency:
32+
cancel-in-progress: false
33+
group: deploy-${{ github.event.inputs.stack || 'default' }}
34+
35+
steps:
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+
46+
- name: Deployment Summary
47+
uses: DefangLabs/defang-github-action@v1.4.0
48+
with:
49+
command: services
50+
stack: ${{ github.event.inputs.stack || '' }}

0 commit comments

Comments
 (0)