From 1f1a430efc5f97b9e2750d3dde243c43dfbb0a71 Mon Sep 17 00:00:00 2001 From: Hazel Date: Tue, 21 Nov 2023 18:54:46 +0000 Subject: [PATCH] add check whether submodules exist --- .github/workflows/build-shit.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-shit.yml b/.github/workflows/build-shit.yml index 22fccbf09..0b3cac25e 100644 --- a/.github/workflows/build-shit.yml +++ b/.github/workflows/build-shit.yml @@ -14,8 +14,19 @@ jobs: - name: ensure git cli is installed run: apt update && apt install sudo git -y - uses: actions/checkout@v3 - - name: print latest_commit - run: echo ${{ github.sha }} + with: + submodules: 'recursive' + token: ${{ secrets.GH_RO_PAT }} + - name: check whether submodules exist + run: + # debug output + echo gh=${{ github.sha }} + echo head=$(git rev-parse HEAD) + echo art=$(git -C art rev-parse HEAD) + echo assets=$(git -C assets rev-parse HEAD) + # checks if HEAD commit hash in submodules is diff from current repo, and therefore exists + test $(git rev-parse HEAD) != $(git -C art rev-parse HEAD) + test $(git rev-parse HEAD) != $(git -C assets rev-parse HEAD) - id: should_run continue-on-error: true name: check latest commit is less than a day