[DO NOT MERGE] Test go canonicalizer #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: gocan | |
| on: | |
| pull_request: | |
| # Cancel the workflow in progress if a newer build is about to start. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| gocan: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Annotate layout-only changes | |
| run: | | |
| curl -sLO https://github.com/vearutop/gocan/releases/download/v0.0.5/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz | |
| gocan_hash=$(git hash-object ./gocan) | |
| [ "$gocan_hash" == "98c1ea372abf02d6c8583689c28c8589c442674f" ] || (echo "::error::unexpected hash for gocan, possible tampering: $gocan_hash" && exit 1) | |
| git fetch --no-tags --depth=1 origin ${{ github.event.pull_request.base.sha }} | |
| git fetch --no-tags --depth=1 origin ${{ github.event.pull_request.head.sha }} | |
| ./gocan -gh-checks -gh-base ${{ github.event.pull_request.base.sha }} -gh-head ${{ github.event.pull_request.head.sha }} |