Fix checking out the submodules in the CI

This commit is contained in:
Maschell 2020-12-05 13:01:46 +01:00
parent 81f72440f0
commit 5c5b657247
2 changed files with 15 additions and 2 deletions

View File

@ -6,12 +6,18 @@ on:
- main - main
jobs: jobs:
build-binary: build-binary:
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: - name: Checkout submodules using a PAT
submodules: true 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 - name: build binary
run: | run: |
docker build . -t builder docker build . -t builder

View File

@ -7,6 +7,13 @@ jobs:
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
steps: steps:
- uses: actions/checkout@v2 - 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 - name: build binary
run: | run: |
docker build . -t builder docker build . -t builder