From cfd6f2e76256290a682b0aeed5def62afefe68fb Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 29 Jun 2023 11:13:09 +0100 Subject: [PATCH] Fetch only when running in the repo --- .github/workflows/budibase_ci.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index b61f2eab67..bb5f5089a0 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -26,16 +26,17 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Fetch pro submodule if running in BB - env: - PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - run: | - if [ "$GITHUB_REPOSITORY" = "Budibase/budibase" ]; then - GIT_TERMINAL_PROMPT=0 git -c "http.extraheader=Authorization: Bearer $PERSONAL_ACCESS_TOKEN" git submodule update --init --recursive - else - echo "Submodule fetch skipped." - fi + - name: Checkout repo and submodules + uses: actions/checkout@v3 + if: ${{ github.repository == "Budibase/budibase" }} + with: + submodules: true + token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} + + - name: Checkout repo only + uses: actions/checkout@v3 + if: ${{ github.repository != "Budibase/budibase" }} + - name: Use Node.js 14.x uses: actions/setup-node@v3 with: