Chore/trace user #64
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Develop API CI/CD | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'backend/**' | |
- '.github/workflows/lexbox-api.yaml' | |
- '.github/workflows/deploy.yaml' | |
- 'deployment/lexbox-deployment.yaml' | |
branches: | |
- develop | |
pull_request: | |
paths: | |
- 'backend/**' | |
- '.github/workflows/lexbox-api.yaml' | |
- '.github/workflows/deploy.yaml' | |
- 'deployment/lexbox-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-api: | |
name: Build API | |
needs: set-version | |
uses: ./.github/workflows/lexbox-api.yaml | |
with: | |
version: ${{ needs.set-version.outputs.version }} | |
deploy-api: | |
name: Deploy API | |
if: ${{github.ref == 'refs/heads/develop'}} | |
needs: [ build-api, set-version ] | |
uses: ./.github/workflows/deploy.yaml | |
secrets: inherit | |
with: | |
version: ${{ needs.set-version.outputs.version }} | |
image: 'ghcr.io/sillsdev/lexbox-api' | |
k8s-environment: develop | |
deploy-domain: staging.languagedepot.org #todo change to develop | |
integration-tests: | |
name: Integration tests | |
uses: ./.github/workflows/integration-test.yaml | |
if: false #disable develop until we can use a self hosted runner for this test | |
permissions: | |
checks: write | |
secrets: inherit | |
needs: deploy-api | |
with: | |
test-domain: staging.languagedepot.org #todo change to develop |