-
-
Notifications
You must be signed in to change notification settings - Fork 2
72 lines (70 loc) · 2.42 KB
/
develop-fw-headless.yaml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Develop FwHeadless CI/CD
on:
workflow_dispatch:
push:
paths:
- 'backend/FwHeadless/**'
- 'backend/FixFwData/**'
- 'backend/FwLite/FwDataMiniLcmBridge/**'
- 'backend/FwLite/LcmCrdt/**'
- 'backend/FwLite/MiniLcm/**'
- 'backend/FwLiteProjectSync/FwLiteProjectSync/**'
- 'backend/LexCore/**'
- 'backend/LexData/**'
- '.github/workflows/lexbox-fw-headless.yaml'
- '.github/workflows/deploy.yaml'
- 'deployment/base/fw-headless-deployment.yaml'
branches:
- develop
pull_request:
paths:
- 'backend/FwHeadless/**'
- 'backend/FixFwData/**'
- 'backend/FwLite/FwDataMiniLcmBridge/**'
- 'backend/FwLite/LcmCrdt/**'
- 'backend/FwLite/MiniLcm/**'
- 'backend/FwLiteProjectSync/FwLiteProjectSync/**'
- 'backend/LexCore/**'
- 'backend/LexData/**'
- '.github/workflows/lexbox-fw-headless.yaml'
- '.github/workflows/deploy.yaml'
- 'deployment/base/fw-headless-deployment.yaml'
branches:
- develop
jobs:
set-version:
name: Set Version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.setVersion.outputs.VERSION }}
steps:
- name: Set Version
id: setVersion
# set version to date in vYYYY-MM-DD-commitSha format
run: |
shortSha=$(echo ${{ github.sha }} | cut -c1-8)
echo "VERSION=v$(date --rfc-3339=date)-$shortSha" >> ${GITHUB_OUTPUT}
build-fw-headless:
name: Build FwHeadless
needs: set-version
uses: ./.github/workflows/lexbox-fw-headless.yaml
with:
version: ${{ needs.set-version.outputs.version }}
deploy-fw-headless:
name: Deploy FwHeadless
if: ${{github.ref == 'refs/heads/develop'}}
needs: [ build-fw-headless, set-version ]
uses: ./.github/workflows/deploy.yaml
secrets: inherit
with:
version: ${{ needs.set-version.outputs.version }}
image: 'ghcr.io/sillsdev/lexbox-fw-headless'
k8s-environment: develop
deploy-domain: lexbox.dev.languagetechnology.org
# TODO: Run FwHeadless tests once we have developed them, but we don't need to run the whole integration test suite if only FwHeadless changes are being pushed
# integration-test-gha:
# name: GHA integration tests
# needs: [build-fw-headless, set-version]
# uses: ./.github/workflows/integration-test-gha.yaml
# with:
# lexbox-fw-headless-tag: ${{ needs.set-version.outputs.version }}