Skip to content

[ci] more proper name for check types, small fix #6

[ci] more proper name for check types, small fix

[ci] more proper name for check types, small fix #6

Workflow file for this run

name: Check
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main", "dev" ]
jobs:
check:
runs-on: ubuntu-latest
outputs:
is_rust: ${{ steps.check_type.outputs.is_rust }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Determine Rust or C check
id: check_type
run: |
PREV_SHA=$(git rev-parse HEAD^)
if git diff --name-only $PREV_SHA ${{ github.sha }} | \
grep -qE '^(rust/|board/100ask-d1-h-rs/)'; then
echo "::set-output name=is_rust::true"
else
echo "::set-output name=is_rust::false"
fi
cargo_check:
name: Cargo
needs: check
if: ${{ needs.check.outputs.is_rust == 'true' }}
uses: ./.github/workflows/Cargo.yml
cmake_check:
name: CMake
needs: check
if: ${{ needs.check.outputs.is_rust == 'false' }}
uses: ./.github/workflows/CMake.yml