From bef4d1766368b01e2e0df26a5b4a388d409125ed Mon Sep 17 00:00:00 2001 From: Thilo Hohlt Date: Sun, 27 Oct 2024 00:46:28 +0200 Subject: [PATCH] Update deploy.yml --- .github/workflows/deploy.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 70cce7c..239f825 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,11 +7,19 @@ on: branches: [ devel, main ] jobs: - deploy: + environment-check: runs-on: ubuntu-latest if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' }} + outputs: + env_name: ${{ github.event.workflow_run.head_branch == 'devel' && 'qs' || 'prod' }} + steps: + - run: echo "Determining environment..." + + deploy: + needs: environment-check + runs-on: ubuntu-latest environment: - name: ${{ github.event.workflow_run.head_branch == 'devel' && 'qs' || 'prod' }} + name: ${{ needs.environment-check.outputs.env_name }} steps: - uses: actions/checkout@v4