Skip to content

Commit 2f3858b

Browse files
Merge pull request #32 from sparrowapp-dev/release/stg-workflow
adding workflow for staging
2 parents d4805b2 + f211dbd commit 2f3858b

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/staging.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Staging Deployment
2+
on:
3+
push:
4+
branches:
5+
- release/2.34.0
6+
workflow_dispatch:
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@master
12+
13+
- uses: Azure/docker-login@v1
14+
with:
15+
login-server: sparrowprod.azurecr.io
16+
username: ${{ secrets.REGISTRY_USERNAME }}
17+
password: ${{ secrets.REGISTRY_PASSWORD }}
18+
19+
- run: |
20+
docker build . -t sparrowprod.azurecr.io/sparrow-proxy:${{ github.run_number }}
21+
docker push sparrowprod.azurecr.io/sparrow-proxy:${{ github.run_number }}
22+
deploy:
23+
needs: build
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@master
27+
- uses: richardrigutins/replace-in-files@v1
28+
with:
29+
files: "./deploymentManifests/deployment.yml"
30+
search-text: '_BUILD__ID_'
31+
replacement-text: '${{ github.run_number }}'
32+
33+
- uses: azure/[email protected]
34+
35+
- uses: Azure/k8s-set-context@v2
36+
with:
37+
kubeconfig: ${{ secrets.KUBE_CONFIG }}
38+
39+
- uses: Azure/k8s-deploy@v4
40+
with:
41+
action: deploy
42+
namespace: sparrow-staging
43+
manifests: |
44+
./deploymentManifests/deployment.yml

0 commit comments

Comments
 (0)