Update deploy.yml

This commit is contained in:
Thilo Hohlt
2024-10-27 00:46:28 +02:00
committed by GitHub
parent a0190a324c
commit bef4d17663

View File

@@ -7,11 +7,19 @@ on:
branches: [ devel, main ] branches: [ devel, main ]
jobs: jobs:
deploy: environment-check:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' }} 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: environment:
name: ${{ github.event.workflow_run.head_branch == 'devel' && 'qs' || 'prod' }} name: ${{ needs.environment-check.outputs.env_name }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4