Skip to content

Commit

Permalink
allow triggering a build and deploy an arbitrary branch to the develo…
Browse files Browse the repository at this point in the history
…p environment
  • Loading branch information
hahn-kev committed Apr 8, 2024
1 parent 0573ab7 commit 1d64238
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/deploy-branch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy to Develop
run-name: Deploy ${{ github.ref_name }} to Develop
on:
workflow_dispatch:


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 }}
label-latest: true

build-ui:
name: Build UI
needs: [ set-version ]
uses: ./.github/workflows/lexbox-ui.yaml
with:
version: ${{ needs.set-version.outputs.version }}
label-latest: true

build-hgweb:
name: Build hgweb
needs: [ set-version ]
uses: ./.github/workflows/lexbox-hgweb.yaml
with:
version: ${{ needs.set-version.outputs.version }}
label-latest: true

deploy:
name: Deploy Develop
uses: ./.github/workflows/deploy.yaml
needs: [ build-api, build-ui, build-hgweb, set-version ]
secrets: inherit
with:
version: ${{ needs.set-version.outputs.version }}
image: 'ghcr.io/sillsdev/lexbox-*'
k8s-environment: develop
deploy-domain: lexbox.dev.languagetechnology.org

0 comments on commit 1d64238

Please sign in to comment.