Files
pleno-vue/.github/workflows/code_quality.yml
T
Jeppe B 18302723e8 Prepare frontend master branch protection (#172)
Add stable Required CI, repair E2E ownership, make Qodana optional-state handling explicit, and document the desired protection policy.
2026-07-16 13:12:57 +02:00

66 lines
2.5 KiB
YAML

name: Qodana Configuration Upload
on:
push:
branches: [master, beta, canary, internal]
pull_request:
branches: [master, beta, canary, internal]
workflow_dispatch:
permissions:
contents: read
jobs:
upload-qodana-config:
runs-on: [self-hosted, Linux, X64, default]
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Detect Qodana upload prerequisites
id: qodana-upload-prerequisites
shell: bash
env:
QODANA_CONFIGURATIONS_TOKEN: ${{ secrets.QODANA_CONFIGURATIONS_TOKEN }}
run: |
set -euo pipefail
config_present=false
token_present=false
[[ -f qodana-global-configurations.yaml ]] && config_present=true
[[ -n "${QODANA_CONFIGURATIONS_TOKEN:-}" ]] && token_present=true
if [[ "$config_present" == true && "$token_present" == true ]]; then
echo "ready=true" >> "$GITHUB_OUTPUT"
echo "reason=all prerequisites are configured" >> "$GITHUB_OUTPUT"
elif [[ "$config_present" != true && "$token_present" != true ]]; then
echo "ready=false" >> "$GITHUB_OUTPUT"
echo "reason=qodana-global-configurations.yaml and QODANA_CONFIGURATIONS_TOKEN are missing" >> "$GITHUB_OUTPUT"
elif [[ "$config_present" != true ]]; then
echo "ready=false" >> "$GITHUB_OUTPUT"
echo "reason=qodana-global-configurations.yaml is missing" >> "$GITHUB_OUTPUT"
else
echo "ready=false" >> "$GITHUB_OUTPUT"
echo "reason=QODANA_CONFIGURATIONS_TOKEN is missing" >> "$GITHUB_OUTPUT"
fi
- name: Run Qodana Configuration Uploader
if: ${{ steps.qodana-upload-prerequisites.outputs.ready == 'true' }}
env:
QODANA_CONFIGURATIONS_TOKEN: ${{ secrets.QODANA_CONFIGURATIONS_TOKEN }}
run: |
docker run --rm \
-v "$(pwd):/workspace" \
-w /workspace \
-e QODANA_CONFIGURATIONS_TOKEN \
jetbrains/qodana-configuration-uploader@sha256:f4786ceea616048c3401cf0b0345d2220d22a2ec7b046fd48cbbfc522e6efe30 \
--global-configs-file qodana-global-configurations.yaml \
--qodana-host https://qodana.cloud
- name: Skip Qodana Configuration Upload
if: ${{ steps.qodana-upload-prerequisites.outputs.ready != 'true' }}
env:
QODANA_SKIP_REASON: ${{ steps.qodana-upload-prerequisites.outputs.reason }}
run: echo "Skipping Qodana configuration upload because ${QODANA_SKIP_REASON}."