Skip to content

Commit 361b5d0

Browse files
committed
feature: "Staging API" env deploy action
1 parent 0881bc8 commit 361b5d0

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Pack and Deploy Staging API
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy-staging-api-env-on-merge-into-main:
10+
# dispatch another copy of the deploy.yaml workflow that deploys the Staging API env
11+
uses: ./.github/workflows/deploy.yaml
12+
permissions:
13+
contents: read
14+
deployments: write
15+
packages: write
16+
with:
17+
environment: Staging API
18+
secrets:
19+
VAULT_APPROLE_ROLE_ID: ${{ secrets.VAULT_APPROLE_ROLE_ID }}
20+
VAULT_APPROLE_SECRET_ID: ${{ secrets.VAULT_APPROLE_SECRET_ID }}
21+
CHARMHUB_TOKEN: ${{ secrets.CHARMHUB_TOKEN }}

.github/workflows/deploy.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,23 @@ on:
55
branches:
66
- main
77
- staging
8+
workflow_call:
9+
inputs:
10+
environment:
11+
description: 'Environment (Production, Staging or Staging API)'
12+
required: true
13+
type: string
814
workflow_dispatch:
915
inputs:
1016
environment:
11-
description: 'Environment (Production or Staging)'
17+
description: 'Environment (Production, Staging or Staging API)'
1218
required: true
1319
type: choice
1420
options:
1521
- Production
1622
- Staging
23+
- Staging API
24+
1725
jobs:
1826
setup:
1927
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)