From 8620567d9d3cbab0826ca4ecae676021f873bc6b Mon Sep 17 00:00:00 2001 From: "Felix T.J. Dietrich" Date: Fri, 6 Dec 2024 22:18:51 +0100 Subject: [PATCH] add deploy to prod workflow (#121) --- .github/workflows/deploy-prod.yml | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/deploy-prod.yml diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml new file mode 100644 index 00000000..74731c3a --- /dev/null +++ b/.github/workflows/deploy-prod.yml @@ -0,0 +1,32 @@ +name: Deploy to Production + +on: + workflow_dispatch: + inputs: + image-tag: + type: string + description: "Image tag to deploy (default: pr- if PR exists, latest for default branch)" + +jobs: + prepare-env: + runs-on: ubuntu-latest + environment: Production + outputs: + env-vars: | + DEPLOYMENT_URL=${{ vars.DEPLOYMENT_URL }} + APOLLON_REDIS_DIAGRAM_TTL=${{ vars.APOLLON_REDIS_DIAGRAM_TTL }} + steps: + - name: Do nothing + run: echo "Nothing to do here" + + deploy: + needs: prepare-env + # TODO: uses: ls1intum/.github/.github/workflows/deploy-docker-compose.yml@main + uses: ./.github/workflows/deploy-docker-compose-shared.yml + with: + environment: Production + docker-compose-file: "./docker-compose.prod.yml" + main-image-name: ls1intum/apollon_standalone + image-tag: ${{ inputs.image-tag }} + env-vars: ${{ needs.prepare-env.outputs.env-vars }} + secrets: inherit