From 1b3e1c4331d3c0f243d5059dc460a009ba8a462a Mon Sep 17 00:00:00 2001 From: Amir Gonnen Date: Fri, 11 Sep 2020 02:20:59 +0300 Subject: [PATCH] Fix submodule checkout in both push and PR (#1783) --- .github/workflows/build_micropython.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_micropython.yml b/.github/workflows/build_micropython.yml index b7097d5b3..31487c7b6 100644 --- a/.github/workflows/build_micropython.yml +++ b/.github/workflows/build_micropython.yml @@ -21,11 +21,13 @@ jobs: run: git clone https://github.com/lvgl/lv_micropython.git . - name: Update submodules run: git submodule update --init --recursive - - name: Checkout lv_bindings + - name: Checkout LVGL submodule working-directory: ./lib/lv_bindings/lvgl run: | - git fetch - git checkout $GITHUB_SHA + git fetch --force ${{ github.event.repository.git_url }} "+refs/heads/*:refs/remotes/origin/*" + git fetch --force ${{ github.event.repository.git_url }} "+refs/pull/*/head:refs/remotes/origin/pr/*" + git checkout ${{ github.sha }} || git checkout ${{ github.event.pull_request.head.sha }} + git submodule update --init --recursive - name: Build mpy-cross run: make -j $(nproc) -C mpy-cross - name: Build the unix port