Skip to content

Commit

Permalink
only deploy hgweb for the push event on develop. Checkout main on fle…
Browse files Browse the repository at this point in the history
…et repo explicitly. Prevent images from getting tagged as latest when running manual deploy, latest should only be for main.
  • Loading branch information
hahn-kev committed May 28, 2024
1 parent dd25902 commit 19ae3c6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ jobs:
uses: ./.github/workflows/lexbox-api.yaml
with:
version: ${{ needs.set-version.outputs.version }}
label-latest: true
label-latest: false

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

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

deploy:
name: Deploy Develop
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
repository: ${{ vars.FLEET_REPO }}
ssh-key: ${{ secrets.FLEET_REPO_SSH_KEY }}
path: fleet
ref: main
- name: Copy yaml resources to fleet repo
run: |
cp lexbox/deployment/${{ inputs.k8s-environment }}/resources.yaml fleet/${{ inputs.k8s-environment }}/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lexbox-hgweb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
deploy-hgweb:
uses: ./.github/workflows/deploy.yaml
if: ${{github.ref == 'refs/heads/develop'}}
if: ${{github.ref == 'refs/heads/develop' && github.event_name == 'push'}}
secrets: inherit
needs: publish-hgweb
with:
version: ${{ needs.publish-hgweb.outputs.version }}
image: 'ghcr.io/sillsdev/lexbox-hgweb'
deploy-domain: 'develop.lexbox.org'
deploy-domain: lexbox.dev.languagetechnology.org
k8s-environment: 'develop'

0 comments on commit 19ae3c6

Please sign in to comment.