From 0a5df2e2d9efd27dcae94f4337e9ef5e82b8ddc2 Mon Sep 17 00:00:00 2001 From: Gichan Jang Date: Wed, 27 Nov 2024 13:44:42 +0900 Subject: [PATCH] TEMP Signed-off-by: Gichan Jang --- .github/workflows/yocto.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/yocto.yml b/.github/workflows/yocto.yml index e4c344763..110f31b71 100644 --- a/.github/workflows/yocto.yml +++ b/.github/workflows/yocto.yml @@ -15,9 +15,21 @@ jobs: name: Build with Yocto / meta-neural-network on Ubuntu runs-on: ubuntu-22.04 steps: + - name: get fetch depth + id: fetch_depth + run: | + if github.event_name == 'pull_request' + echo "depth=${{ github.event.pull_request.commits }}" >> $GITHUB_OUTPUT + else + echo "depth=1" >> $GITHUB_OUTPUT + fi + - name: Check fetch depth + run : echo "fetch depth, ${{ steps.fetch_depth.outputs.depth }}" - uses: actions/checkout@v4 with: - fetch-depth: ${{ github.event.pull_request.commits }} + fetch-depth: steps.fetch_depth.outputs.depth + - name: check the number of commits + run: echo ${{ github.event.pull_request.commits }} - name: Check if rebuild required uses: ./.github/actions/check-rebuild with: