diff --git a/.github/scripts/extract_matrix.py b/.github/scripts/extract_matrix.py index 65a0b6bb3b..ab230a8896 100644 --- a/.github/scripts/extract_matrix.py +++ b/.github/scripts/extract_matrix.py @@ -75,7 +75,7 @@ "ECLIPSE": "https://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/R-4.26-202211231800/eclipse-SDK-4.26-linux-gtk-x86_64.tar.gz" } -# Gitlab Runners OSS +# Github Runners OSS OSS = { "macos-latest": ["darwin", "aarch64"], "ubuntu-latest": ["linux", "amd64"], diff --git a/.github/workflows/ci-post-merge.yml b/.github/workflows/ci-post-merge.yml new file mode 100644 index 0000000000..892fc02514 --- /dev/null +++ b/.github/workflows/ci-post-merge.yml @@ -0,0 +1,49 @@ +name: Post Merge Actions +on: + pull_request: + types: [closed] + +jobs: + check-ci-and-notify: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v8 + with: + script: | + const GRAALVMBOT_LOGIN = "graalvmbot"; + const pr = context.payload.pull_request; + if (!pr || !pr.number || pr.state !== "closed") return; + + const author = pr.user; + const assignees = pr.assignees || []; + if (!author || author.login !== GRAALVMBOT_LOGIN) return; + if (assignees.length !== 1) return; + + const sha = pr.head.sha; + + const runsResp = await github.rest.actions.listWorkflowRunsForRepo({ + owner: context.repo.owner, + repo: context.repo.repo, + head_sha: sha, + event: "pull_request", + per_page: 10 + }); + + const failedRun = runsResp.data.workflow_runs.find(run => + run.head_sha === sha && + run.status === "completed" && + run.conclusion !== "success" + ); + + if (!failedRun) { + console.log("No failed CI workflow found for the PR."); + return; + } + + await github.rest.issues.createComment({ + issue_number: pr.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `@${assignees[0].login} - One or more CI jobs failed - [View details](${failedRun.html_url})` + }); + console.log("CI failed, assignee notified.") \ No newline at end of file diff --git a/.github/workflows/ci-unittests.yml b/.github/workflows/ci-unittests.yml index 4493dcb7bf..107daedde2 100644 --- a/.github/workflows/ci-unittests.yml +++ b/.github/workflows/ci-unittests.yml @@ -14,8 +14,8 @@ jobs: artifacts_retention_days: 0 run-tests: - if: github.event.pull_request.draft == false && success() + if: success() needs: build-standalone-artifacts uses: ./.github/workflows/ci-matrix-gen.yml with: - jobs_to_run: ^(?!python-svm-build|style).*-gate.*$ + jobs_to_run: ^(?!python-svm-build|style).*-gate.*$ \ No newline at end of file