From eb1b567d148a1d6b2d823d1edd760b104378e341 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Mon, 11 Mar 2024 13:16:24 +0100 Subject: [PATCH] Plugin E2E: Workflow fixes (#806) --- .github/workflows/playwright.yml | 2 +- docusaurus/docs/snippets/plugin-e2e-ds-workflow.npm.md | 8 ++++---- .../docs/snippets/plugin-e2e-ds-workflow.pnpm.md | 10 +++++----- .../docs/snippets/plugin-e2e-ds-workflow.yarn.md | 10 +++++----- .../docs/snippets/plugin-e2e-fe-plugin-workflow.npm.md | 4 ++-- .../snippets/plugin-e2e-fe-plugin-workflow.pnpm.md | 4 ++-- .../snippets/plugin-e2e-fe-plugin-workflow.yarn.md | 4 ++-- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index eb831d3bd..a1c6d4caf 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -70,7 +70,7 @@ jobs: GOOGLE_JWT_FILE: ${{ secrets.GOOGLE_JWT_FILE }} - name: Publish report to GCS - if: ${{ (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') && github.event.organization.login == 'grafana' }} + if: ${{ github.repository_owner == 'grafana' && (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') }} uses: grafana/plugin-actions/publish-report@main with: grafana-version: ${{ matrix.GRAFANA_IMAGE.VERSION }} diff --git a/docusaurus/docs/snippets/plugin-e2e-ds-workflow.npm.md b/docusaurus/docs/snippets/plugin-e2e-ds-workflow.npm.md index 302925452..7e346fb4f 100644 --- a/docusaurus/docs/snippets/plugin-e2e-ds-workflow.npm.md +++ b/docusaurus/docs/snippets/plugin-e2e-ds-workflow.npm.md @@ -38,14 +38,14 @@ jobs: with: node-version-file: .nvmrc + - name: Install npm dependencies + run: npm ci + - name: Install Mage uses: magefile/mage-action@v3 with: install-only: true - - name: Install npm dependencies - run: npm ci - - name: Build binaries run: mage -v build:linux @@ -74,7 +74,7 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v4 - if: ${{ (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') && github.event.organization.login != 'grafana' }} + if: ${{ github.repository_owner != 'grafana' && (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') }} with: name: playwright-report-${{ matrix.GRAFANA_IMAGE.NAME }}-v${{ matrix.GRAFANA_IMAGE.VERSION }}-${{github.run_id}} path: playwright-report/ diff --git a/docusaurus/docs/snippets/plugin-e2e-ds-workflow.pnpm.md b/docusaurus/docs/snippets/plugin-e2e-ds-workflow.pnpm.md index 2088b5bbc..0ebdd3956 100644 --- a/docusaurus/docs/snippets/plugin-e2e-ds-workflow.pnpm.md +++ b/docusaurus/docs/snippets/plugin-e2e-ds-workflow.pnpm.md @@ -40,14 +40,14 @@ jobs: with: node-version-file: .nvmrc + - name: Install pnpm dependencies + run: pnpm install --frozen-lockfile + - name: Install Mage uses: magefile/mage-action@v3 with: install-only: true - - name: Install pnpm dependencies - run: pnpm install --frozen-lockfile - - name: Build binaries run: mage -v build:linux @@ -76,14 +76,14 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v4 - if: ${{ (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') && github.event.organization.login != 'grafana' }} + if: ${{ github.repository_owner != 'grafana' && (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') }} with: name: playwright-report-${{ matrix.GRAFANA_IMAGE.NAME }}-v${{ matrix.GRAFANA_IMAGE.VERSION }}-${{github.run_id}} path: playwright-report/ retention-days: 30 - name: Publish report to GCS - if: ${{ (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') && github.event.organization.login == 'grafana' }} + if: ${{ github.repository_owner == 'grafana' && (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') }} uses: grafana/plugin-actions/publish-report@main with: grafana-version: ${{ matrix.GRAFANA_IMAGE.VERSION }} diff --git a/docusaurus/docs/snippets/plugin-e2e-ds-workflow.yarn.md b/docusaurus/docs/snippets/plugin-e2e-ds-workflow.yarn.md index 27b4c0fcb..a53bffd3b 100644 --- a/docusaurus/docs/snippets/plugin-e2e-ds-workflow.yarn.md +++ b/docusaurus/docs/snippets/plugin-e2e-ds-workflow.yarn.md @@ -38,14 +38,14 @@ jobs: with: node-version-file: .nvmrc + - name: Install yarn dependencies + run: yarn install + - name: Install Mage uses: magefile/mage-action@v3 with: install-only: true - - name: Install yarn dependencies - run: yarn install - - name: Build binaries run: mage -v build:linux @@ -74,14 +74,14 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v4 - if: ${{ (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') && github.event.organization.login != 'grafana' }} + if: ${{ github.repository_owner != 'grafana' && (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') }} with: name: playwright-report-${{ matrix.GRAFANA_IMAGE.NAME }}-v${{ matrix.GRAFANA_IMAGE.VERSION }}-${{github.run_id}} path: playwright-report/ retention-days: 30 - name: Publish report to GCS - if: ${{ (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') && github.event.organization.login == 'grafana' }} + if: ${{ github.repository_owner == 'grafana' && (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') }} uses: grafana/plugin-actions/publish-report@main with: grafana-version: ${{ matrix.GRAFANA_IMAGE.VERSION }} diff --git a/docusaurus/docs/snippets/plugin-e2e-fe-plugin-workflow.npm.md b/docusaurus/docs/snippets/plugin-e2e-fe-plugin-workflow.npm.md index dd439ebfe..7fd822841 100644 --- a/docusaurus/docs/snippets/plugin-e2e-fe-plugin-workflow.npm.md +++ b/docusaurus/docs/snippets/plugin-e2e-fe-plugin-workflow.npm.md @@ -66,14 +66,14 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v4 - if: ${{ (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') && github.event.organization.login != 'grafana' }} + if: ${{ github.repository_owner != 'grafana' && (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') }} with: name: playwright-report-${{ matrix.GRAFANA_IMAGE.NAME }}-v${{ matrix.GRAFANA_IMAGE.VERSION }}-${{github.run_id}} path: playwright-report/ retention-days: 30 - name: Publish report to GCS - if: ${{ (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') && github.event.organization.login == 'grafana' }} + if: ${{ github.repository_owner == 'grafana' && (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') }} uses: grafana/plugin-actions/publish-report@main with: grafana-version: ${{ matrix.GRAFANA_IMAGE.VERSION }} diff --git a/docusaurus/docs/snippets/plugin-e2e-fe-plugin-workflow.pnpm.md b/docusaurus/docs/snippets/plugin-e2e-fe-plugin-workflow.pnpm.md index d42cb5630..7c40dc495 100644 --- a/docusaurus/docs/snippets/plugin-e2e-fe-plugin-workflow.pnpm.md +++ b/docusaurus/docs/snippets/plugin-e2e-fe-plugin-workflow.pnpm.md @@ -68,14 +68,14 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v4 - if: ${{ (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') && github.event.organization.login != 'grafana' }} + if: ${{ github.repository_owner != 'grafana' && (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') }} with: name: playwright-report-${{ matrix.GRAFANA_IMAGE.NAME }}-v${{ matrix.GRAFANA_IMAGE.VERSION }}-${{github.run_id}} path: playwright-report/ retention-days: 30 - name: Publish report to GCS - if: ${{ (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') && github.event.organization.login == 'grafana' }} + if: ${{ github.repository_owner == 'grafana' && (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') }} uses: grafana/plugin-actions/publish-report@main with: grafana-version: ${{ matrix.GRAFANA_IMAGE.VERSION }} diff --git a/docusaurus/docs/snippets/plugin-e2e-fe-plugin-workflow.yarn.md b/docusaurus/docs/snippets/plugin-e2e-fe-plugin-workflow.yarn.md index 2334b8617..5341e1aa0 100644 --- a/docusaurus/docs/snippets/plugin-e2e-fe-plugin-workflow.yarn.md +++ b/docusaurus/docs/snippets/plugin-e2e-fe-plugin-workflow.yarn.md @@ -66,14 +66,14 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v4 - if: ${{ (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') && github.event.organization.login != 'grafana' }} + if: ${{ github.repository_owner != 'grafana' && (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') }} with: name: playwright-report-${{ matrix.GRAFANA_IMAGE.NAME }}-v${{ matrix.GRAFANA_IMAGE.VERSION }}-${{github.run_id}} path: playwright-report/ retention-days: 30 - name: Publish report to GCS - if: ${{ (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') && github.event.organization.login == 'grafana' }} + if: ${{ github.repository_owner == 'grafana' && (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') }} uses: grafana/plugin-actions/publish-report@main with: grafana-version: ${{ matrix.GRAFANA_IMAGE.VERSION }}