ci: require analysis before deploy; make deploy jobs depend on analyze
Some checks failed
Code Analysis and Production Deploy / analyze (push) Failing after 2m36s
Code Analysis and Production Deploy / deploy-production (push) Has been skipped
Code Analysis and Production Deploy / deploy-test (push) Has been skipped

This commit is contained in:
Torsten Schulz (local)
2026-05-20 11:50:47 +02:00
parent fdf72bdb96
commit bc9cc265e1

View File

@@ -8,7 +8,6 @@ on:
jobs: jobs:
analyze: analyze:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -91,6 +90,7 @@ jobs:
./osv-scanner --lockfile ./package-lock.json ./osv-scanner --lockfile ./package-lock.json
deploy-production: deploy-production:
needs: analyze
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main' if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps: steps:
@@ -121,6 +121,7 @@ jobs:
"bash -lc 'cd /var/www/harheimertc && git fetch origin main && git checkout -B main origin/main && git reset --hard origin/main && ./deploy-production.sh'" "bash -lc 'cd /var/www/harheimertc && git fetch origin main && git checkout -B main origin/main && git reset --hard origin/main && ./deploy-production.sh'"
deploy-test: deploy-test:
needs: analyze
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/dev' if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
steps: steps: