-
Notifications
You must be signed in to change notification settings - Fork 6
40 lines (36 loc) · 1.22 KB
/
deploy.yml
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
name: deploy
on:
workflow_dispatch: {}
push:
branches:
- master
- staging
jobs:
test:
uses: ./.github/workflows/test.yml
build-container:
needs: [ test ]
uses: fsinfuhh/workflows/.github/workflows/build_image.yml@main
determine-app-path:
runs-on: ubuntu-latest
outputs:
app-path: ${{ steps.determine-app-path.outputs.app-path }}
steps:
- id: determine-app-path
run: |
if [[ "${{ github.ref_name }}" == "main" || "${{ github.ref_name }}" == "master" ]]; then
echo "app-path=dashboard" >> $GITHUB_OUTPUT
elif [[ "${{ github.ref_name }}" == "stage" || "${{ github.ref_name }}" == "staging" ]]; then
echo "app-path=dashboard-staging" >> $GITHUB_OUTPUT
else
echo "Invalid github ref name ${{ github.ref_name }}"
exit 1
fi
deploy:
needs: [ build-container, determine-app-path ]
uses: fsinfuhh/workflows/.github/workflows/deploy.yml@main
secrets: inherit
with:
app_path: k8s/apps/mafiasi/${{ needs.determine-app-path.outputs.app-path }}
image_name: ${{ needs.build-container.outputs.image_name }}
new_digest: ${{ needs.build-container.outputs.image_digest }}