Deploy to Staging #114
This file contains hidden or 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: Deploy to Staging | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| image-tag: | |
| type: string | |
| required: true | |
| description: "Image tag to deploy (e.g., v0.10.7 for releases)" | |
| deploy-app: | |
| type: boolean | |
| default: true | |
| description: (Re-)deploys the app components | |
| deploy-core: | |
| default: false | |
| type: boolean | |
| description: (Re-)deploys NATS and the Webhook Server (application-server image with the webhook profile). Usually not necessary and might cause data gaps. | |
| deploy-proxy: | |
| default: false | |
| type: boolean | |
| description: (Re-)deploys the proxy components. Usually not necessary and might cause downtime. | |
| workflow_call: | |
| inputs: | |
| image-tag: | |
| type: string | |
| required: true | |
| description: "Image tag to deploy (e.g., v0.10.7 for releases)" | |
| deploy-app: | |
| type: boolean | |
| default: true | |
| description: (Re-)deploys the app components | |
| deploy-core: | |
| default: false | |
| type: boolean | |
| description: (Re-)deploys NATS and the Webhook Server (application-server image with the webhook profile). Usually not necessary and might cause data gaps. | |
| deploy-proxy: | |
| default: false | |
| type: boolean | |
| description: (Re-)deploys the proxy components. Usually not necessary and might cause downtime. | |
| concurrency: | |
| group: deploy-staging | |
| cancel-in-progress: false | |
| jobs: | |
| deploy-app: | |
| if: ${{ inputs.deploy-app }} | |
| uses: ls1intum/.github/.github/workflows/deploy-docker-compose.yml@main | |
| with: | |
| environment: Staging | |
| docker-compose-file: "./docker/compose.app.yaml" | |
| main-image-name: ls1intum/hephaestus/application-server | |
| image-tag: ${{ inputs.image-tag }} | |
| deployment-base-path: "/opt/hephaestus/app" | |
| secrets: inherit | |
| deploy-core: | |
| if: ${{ inputs.deploy-core }} | |
| uses: ls1intum/.github/.github/workflows/deploy-docker-compose.yml@main | |
| with: | |
| environment: Staging | |
| docker-compose-file: "./docker/compose.core.yaml" | |
| # compose.core.yaml now runs `webhook-server` from the application-server image | |
| # (SPRING_PROFILES_ACTIVE=prod,webhook). See ADR 0008. | |
| main-image-name: ls1intum/hephaestus/application-server | |
| image-tag: ${{ inputs.image-tag }} | |
| deployment-base-path: "/opt/hephaestus/core" | |
| secrets: inherit | |
| deploy-proxy: | |
| if: ${{ inputs.deploy-proxy }} | |
| uses: ls1intum/.github/.github/workflows/deploy-docker-compose.yml@main | |
| with: | |
| environment: Staging | |
| docker-compose-file: "./docker/compose.proxy.yaml" | |
| # We just keep the main-image-name and image-tag as placeholders | |
| main-image-name: ls1intum/hephaestus/application-server | |
| image-tag: ${{ inputs.image-tag }} | |
| deployment-base-path: "/opt/hephaestus/proxy" | |
| secrets: inherit |