From df322564d0b989591038c59858932194505692f4 Mon Sep 17 00:00:00 2001 From: Arran Schlosberg <519948+ARR4N@users.noreply.github.com> Date: Sat, 14 Sep 2024 09:33:20 +0100 Subject: [PATCH] chore: workflow to print diffs vs `libevm-base` tag (#18) * chore: workflow to print diffs vs `libevm-base` tag * fix: job name * fix: use `${{ github.ref_name }}` instead of `HEAD` * fix: use `github.sha` instead of `github.ref_name` * fix: `fetch-tags: true` * chore: fml * fix: `fetch-depth: 0` for more than just 1 commit * fix: check out branch before performing diff * chore: `set -x` to aid debugging * fix: add `--` suffix to `git checkout` * fix: use `github.ref_name` instead of `github.sha` * refactor: move all actions inside workflow * fix: use `github.ref` for full name * fix: only use explicit diff for `libevm` * chore: `git diff --color=always` * feat: color-blindness a11y --- .github/workflows/libevm-delta.yml | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/libevm-delta.yml diff --git a/.github/workflows/libevm-delta.yml b/.github/workflows/libevm-delta.yml new file mode 100644 index 000000000000..7513fc1ca462 --- /dev/null +++ b/.github/workflows/libevm-delta.yml @@ -0,0 +1,38 @@ +name: libevm delta + +on: + push: + branches: [ libevm ] + pull_request: + branches: [ libevm ] + workflow_dispatch: + +jobs: + diffs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # everything + fetch-tags: true + + - 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 libevm-base + run: | + git diff --diff-filter=a --word-diff --unified=0 --color=always \ + libevm-base \ + ':(exclude).golangci.yml' \ + ':(exclude).github/**'; + + - name: git diff libevm-base..libevm + run: | + git checkout libevm --; + git diff --diff-filter=a --word-diff --unified=0 --color=always \ + libevm-base \ + ':(exclude).golangci.yml' \ + ':(exclude).github/**'; +