Skip to content

ci: harden release automation metadata #104

ci: harden release automation metadata

ci: harden release automation metadata #104

name: Deploy to Staging

Check failure on line 1 in .github/workflows/deploy-staging.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy-staging.yml

Invalid workflow file

(Line: 62, Col: 5): Unexpected value 'uses', (Line: 63, Col: 5): Unexpected value 'with', (Line: 69, Col: 5): Unexpected value 'secrets', (Line: 57, Col: 5): Required property is missing: runs-on, (Line: 77, Col: 5): Unexpected value 'uses', (Line: 78, Col: 5): Unexpected value 'with', (Line: 84, Col: 5): Unexpected value 'secrets', (Line: 72, Col: 5): Required property is missing: runs-on, (Line: 92, Col: 5): Unexpected value 'uses', (Line: 93, Col: 5): Unexpected value 'with'
on:
workflow_dispatch:
inputs:
image-tag:
type: string
description: "Image tag to deploy (default: pr-<number> if PR exists, latest for default branch)"
app-version:
type: string
description: "Optional runtime version shown in the UI"
default: ""
git-sha:
type: string
description: "Optional commit SHA used for traceability"
default: ""
deploy-app:
type: boolean
default: true
description: (Re-)deploys the app components
deploy-core:
default: false
type: boolean
description: (Re-)deploys NATS, Keycloak, Webhook Ingest. 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
description: "Image tag to deploy (default: pr-<number> if PR exists, latest for default branch)"
app-version:
type: string
description: "Optional runtime version shown in the UI"
default: ""
git-sha:
type: string
description: "Optional commit SHA used for traceability"
default: ""
deploy-app:
type: boolean
default: true
description: (Re-)deploys the app components
deploy-core:
default: false
type: boolean
description: (Re-)deploys NATS, Keycloak, Webhook Ingest. 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.
jobs:
deploy-app:
if: ${{ inputs.deploy-app }}
env:
IMAGE_TAG: ${{ inputs.image-tag }}
APP_VERSION: ${{ inputs.app-version != '' && inputs.app-version || inputs.image-tag }}
GIT_SHA: ${{ inputs.git-sha != '' && inputs.git-sha || inputs.image-tag }}
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 }}
env:
IMAGE_TAG: ${{ inputs.image-tag }}
APP_VERSION: ${{ inputs.app-version != '' && inputs.app-version || inputs.image-tag }}
GIT_SHA: ${{ inputs.git-sha != '' && inputs.git-sha || inputs.image-tag }}
uses: ls1intum/.github/.github/workflows/deploy-docker-compose.yml@main
with:
environment: Staging
docker-compose-file: "./docker/compose.core.yaml"
main-image-name: ls1intum/hephaestus/webhook-ingest
image-tag: ${{ inputs.image-tag }}
deployment-base-path: "/opt/hephaestus/core"
secrets: inherit
deploy-proxy:
if: ${{ inputs.deploy-proxy }}
env:
IMAGE_TAG: ${{ inputs.image-tag }}
APP_VERSION: ${{ inputs.app-version != '' && inputs.app-version || inputs.image-tag }}
GIT_SHA: ${{ inputs.git-sha != '' && inputs.git-sha || inputs.image-tag }}
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