From 1e212652ceceacea073140a0b145a46b7dcc03cb Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Thu, 30 Oct 2025 16:44:04 +0000 Subject: [PATCH] Fix invalid secrets syntax --- .github/workflows/playwright.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 9790c6ab..92946a1c 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -30,9 +30,13 @@ jobs: echo "✅ Required secrets validated" - name: Test Grafana Cloud Loki Connection - if: ${{ secrets.GRAFANA_LOKI_URL != '' }} continue-on-error: true run: | + if [ -z "${{ secrets.GRAFANA_LOKI_URL }}" ]; then + echo "⏭️ Skipping Loki connection test (GRAFANA_LOKI_URL not configured)" + exit 0 + fi + echo "🔍 Testing Grafana Cloud Loki connection..." timestamp=$(date +%s)000000000 @@ -90,9 +94,13 @@ jobs: run: npx playwright install --with-deps ${{ matrix.browser }} - name: Send Test Start Event to Loki - if: ${{ secrets.GRAFANA_LOKI_URL != '' }} continue-on-error: true run: | + if [ -z "${{ secrets.GRAFANA_LOKI_URL }}" ]; then + echo "⏭️ Skipping Loki logging (GRAFANA_LOKI_URL not configured)" + exit 0 + fi + timestamp=$(date +%s)000000000 response=$(curl -s -w "\n%{http_code}" \ @@ -168,9 +176,14 @@ jobs: fi - name: Send Test Results to Loki - if: always() && secrets.GRAFANA_LOKI_URL != '' + if: always() continue-on-error: true run: | + if [ -z "${{ secrets.GRAFANA_LOKI_URL }}" ]; then + echo "⏭️ Skipping Loki logging (GRAFANA_LOKI_URL not configured)" + exit 0 + fi + STATUS="${{ steps.playwright-run.outputs.test_exit_code == '0' && 'success' || 'failure' }}" timestamp=$(date +%s)000000000