File tree Expand file tree Collapse file tree 1 file changed +20
-6
lines changed
Expand file tree Collapse file tree 1 file changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,25 @@ jobs:
2323 - name : checkout
2424 uses : actions/checkout@v4
2525
26- - name : install rustup
26+ - name : Build check_diff binary
27+ working-directory : ./check_diff
28+ run : cargo build -r
29+
30+ - name : Run Diff Check
31+ working-directory : ./check_diff
32+ env :
33+ CHECK_DIFF_LOG : info
34+ shell : bash
2735 run : |
28- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh
29- sh rustup-init.sh -y --default-toolchain none
30- rustup target add x86_64-unknown-linux-gnu
36+ OPTIONS=""
37+
38+ if [[ -n "${{ github.event.inputs.commit_hash }}" ]]; then
39+ OPTIONS="--commit-hash ${{ github.event.inputs.commit_hash }} "
40+ fi
41+
42+ if [[ -n "${{ github.event.inputs.rustfmt_configs }}" ]]; then
43+ OPTIONS="--rustfmt-config ${{ github.event.inputs.rustfmt_configs }} "
44+ fi
3145
32- - name : check diff
33- run : bash ${GITHUB_WORKSPACE}/ci/check_diff.sh ${{ github.event.inputs.clone_url }} ${{ github.event.inputs.branch_name }} ${{ github.event.inputs.commit_hash || github.event.inputs.branch_name }} ${{ github.event.inputs.rustfmt_configs }}
46+ target/release/check_diff ${{ github.event.inputs.clone_url }} ${{ github.event.inputs.branch_name }} \
47+ $OPTIONS
You can’t perform that action at this time.
0 commit comments