From 3babe6e4f6f91c3abdc938210412034d0d9d4e16 Mon Sep 17 00:00:00 2001 From: Gichan Jang Date: Wed, 27 Nov 2024 13:44:42 +0900 Subject: [PATCH] [Yocto] Fix yocto daily build Fix fetcer failure of yocto daily build. Get fetch depth according to the action event. Signed-off-by: Gichan Jang --- .github/workflows/yocto.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/yocto.yml b/.github/workflows/yocto.yml index e4c344763..536df7009 100644 --- a/.github/workflows/yocto.yml +++ b/.github/workflows/yocto.yml @@ -15,9 +15,17 @@ 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' }}; then + echo "depth=${{ github.event.pull_request.commits }}" >> $GITHUB_OUTPUT + else + echo "depth=1" >> $GITHUB_OUTPUT + fi - uses: actions/checkout@v4 with: - fetch-depth: ${{ github.event.pull_request.commits }} + fetch-depth: steps.fetch_depth.outputs.depth - name: Check if rebuild required uses: ./.github/actions/check-rebuild with: