Fetch only when running in the repo

This commit is contained in:
Adria Navarro 2023-06-29 11:13:09 +01:00
parent dacbc02002
commit cfd6f2e762
1 changed files with 11 additions and 10 deletions

View File

@ -26,16 +26,17 @@ jobs:
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - name: Checkout repo and submodules
- name: Fetch pro submodule if running in BB uses: actions/checkout@v3
env: if: ${{ github.repository == "Budibase/budibase" }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} with:
run: | submodules: true
if [ "$GITHUB_REPOSITORY" = "Budibase/budibase" ]; then token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }}
GIT_TERMINAL_PROMPT=0 git -c "http.extraheader=Authorization: Bearer $PERSONAL_ACCESS_TOKEN" git submodule update --init --recursive
else - name: Checkout repo only
echo "Submodule fetch skipped." uses: actions/checkout@v3
fi if: ${{ github.repository != "Budibase/budibase" }}
- name: Use Node.js 14.x - name: Use Node.js 14.x
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with: