From 5c5b657247f525b7344301988bf802cd656d1cf3 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 5 Dec 2020 13:01:46 +0100 Subject: [PATCH] Fix checking out the submodules in the CI --- .github/workflows/ci.yml | 10 ++++++++-- .github/workflows/pr.yml | 7 +++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d473c9..cb98bc5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,12 +6,18 @@ on: - main jobs: + build-binary: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - with: - submodules: true + - name: Checkout submodules using a PAT + run: | + git config --file .gitmodules --get-regexp url | while read url; do + git config --file=.gitmodules $(echo "$url" | sed -E "s/git@github.com:|https:\/\/github.com\//https:\/\/${{ secrets.CI_PAT }}:${{ secrets.CI_PAT }}@github.com\//") + done + git submodule sync + git submodule update --init --recursive - name: build binary run: | docker build . -t builder diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index f907f7e..8e28a5f 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -7,6 +7,13 @@ jobs: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 + - name: Checkout submodules using a PAT + run: | + git config --file .gitmodules --get-regexp url | while read url; do + git config --file=.gitmodules $(echo "$url" | sed -E "s/git@github.com:|https:\/\/github.com\//https:\/\/${{ secrets.CI_PAT }}:${{ secrets.CI_PAT }}@github.com\//") + done + git submodule sync + git submodule update --init --recursive - name: build binary run: | docker build . -t builder