mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-24 07:34:31 +00:00
## Why this should be merged Allows ruleset-required workflows to be triggered by a merge queue, not just the PR for the merge. Although `main` isn't a particularly "busy" branch, a merge queue will ensure that CI passes on the exact version of code that is about to be merged; i.e. (from the [docs]): > The merge queue provides the same benefits as the **Require branches to be up to date before merging** branch protection, but does not require a pull request author to update their pull request branch and wait for status checks to finish before trying to merge. [docs]: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue#about-merge-queues ## How this works Adds `merge_group` workflow trigger with [recommended type](https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#merge_group). ## How this was tested N/A (worst-case it has to be reverted and another PR is temporarily blocked).
50 lines
1.6 KiB
YAML
50 lines
1.6 KiB
YAML
name: libevm delta
|
|
|
|
on:
|
|
push:
|
|
branches: [main, "release/**"]
|
|
pull_request:
|
|
branches: [main, "release/**"]
|
|
merge_group:
|
|
types: [checks_requested]
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
|
|
jobs:
|
|
diffs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0 # everything
|
|
fetch-tags: true
|
|
|
|
- name: Find base commit hash
|
|
id: base-commit
|
|
run: echo "LIBEVM_BASE=$(git rev-list --author "github-actions\[bot\]" --grep "rename Go module" -n 1 origin/main)" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Color-blindness a11y
|
|
run:
|
|
| # https://davidmathlogic.com/colorblind/#%23D81B60-%231E88E5-%23FFC107-%23004D40:~:text=8%20pairs%20of%20contrasting%20colors
|
|
git config color.diff.old "#DC3220";
|
|
git config color.diff.new "#005AB5";
|
|
|
|
- name: git diff ${{ steps.base-commit.outputs.LIBEVM_BASE }}
|
|
run: |
|
|
git diff --diff-filter=a --word-diff --unified=0 --color=always \
|
|
${{ steps.base-commit.outputs.LIBEVM_BASE }} \
|
|
':(exclude).golangci.yml' \
|
|
':(exclude).github/**' \
|
|
':(exclude)README.md';
|
|
|
|
- name: git diff ${{ steps.base-commit.outputs.LIBEVM_BASE }}..main
|
|
run: |
|
|
git checkout main --;
|
|
git diff --diff-filter=a --word-diff --unified=0 --color=always \
|
|
"${{ steps.base-commit.outputs.LIBEVM_BASE }}" \
|
|
':(exclude).golangci.yml' \
|
|
':(exclude).github/**' \
|
|
':(exclude)README.md';
|