From c84b13e9c13b7389781e5e2fbb9a9e12a9553275 Mon Sep 17 00:00:00 2001 From: Keith Williams Date: Wed, 26 Jun 2024 08:44:34 -0300 Subject: [PATCH] chore: Removed unwanted CI changes that made it into main --- .github/workflows/pr-labeled.yml | 54 -------------------------------- .github/workflows/pr.yml | 8 ++--- 2 files changed, 4 insertions(+), 58 deletions(-) delete mode 100644 .github/workflows/pr-labeled.yml diff --git a/.github/workflows/pr-labeled.yml b/.github/workflows/pr-labeled.yml deleted file mode 100644 index ce0e34a2e3a55c..00000000000000 --- a/.github/workflows/pr-labeled.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: PR Labeled with ready-for-e2e - -on: - pull_request_target: - types: [labeled] - branches: - - main - - gh-actions-test-branch - workflow_dispatch: -jobs: - run-e2e-jobs: - name: Run E2E Jobs - runs-on: buildjet-2vcpu-ubuntu-2204 - permissions: - pull-requests: read - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/dangerous-git-checkout - - - name: Check Label and Retrigger Checks - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const labelName = context.payload.label.name; - const prNumber = context.payload.pull_request.number; - const owner = context.repo.owner; - const repo = context.repo.repo; - - if (labelName === 'ready-for-e2e') { - console.log(`Running E2E jobs for PR #${prNumber}...`); - - const checkRuns = await github.rest.checks.listForRef({ - owner, - repo, - ref: context.payload.pull_request.head.sha, - }); - - for (const check of checkRuns.data.check_runs) { - console.log('check.name', check.name); - if (check.name.includes('e2e')) { - await github.rest.actions.reRunJob({ - owner, - repo, - job_id: check.id, - }); - console.log(`Triggering job #${check.id}`); - } - } - - console.log(`Triggered E2E checks for PR #${prNumber}`); - } else { - console.log(`Label ${labelName} does not trigger re-running checks.`); - } diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index abe34c3b79ab16..4b7f069dd15e0c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -134,28 +134,28 @@ jobs: secrets: inherit e2e: - name: e2e + name: Tests needs: [changes, check-label, build] if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }} uses: ./.github/workflows/e2e.yml secrets: inherit e2e-app-store: - name: e2e-app-store + name: Tests needs: [changes, check-label, build] if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }} uses: ./.github/workflows/e2e-app-store.yml secrets: inherit e2e-embed: - name: e2e-embed + name: Tests needs: [changes, check-label, build] if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }} uses: ./.github/workflows/e2e-embed.yml secrets: inherit e2e-embed-react: - name: e2e-embed-react + name: Tests needs: [changes, check-label, build] if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }} uses: ./.github/workflows/e2e-embed-react.yml