ci: ensure github checkout@v1 and checkout@v2 fetch full history

for release builds, alwasy fetch full history otherwise
the old tags will not be found resulting in no relup generated
This commit is contained in:
Zaiming (Stone) Shi 2022-11-14 08:49:03 +01:00
parent 7317a8aba8
commit a48c75594e
3 changed files with 9 additions and 0 deletions

View File

@ -29,6 +29,7 @@ jobs:
- uses: actions/checkout@v3
with:
path: source
fetch-depth: 0 # clone full git history
- name: detect-profiles
id: detect-profiles
uses: ./source/.github/actions/detect-profiles

View File

@ -34,6 +34,8 @@ jobs:
# keep using v1 for now as the otp-23 image has an old version git
# TODO: change to v3 after OTP is upgraded to 23.3.4.18-1
- uses: actions/checkout@v1
with:
fetch-depth: 0 # clone full git history
- name: fix-git-unsafe-repository
run: git config --global --add safe.directory /__w/emqx/emqx
- uses: ./.github/actions/detect-profiles
@ -79,6 +81,8 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # clone full git history
- name: ensure access to github
if: endsWith(github.repository, 'enterprise')
run: |

View File

@ -14,6 +14,8 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # clone full git history
- id: detect-profiles
uses: ./.github/actions/detect-profiles
@ -55,6 +57,8 @@ jobs:
-d "{\"repo\":\"emqx/emqx\", \"tag\": \"${{ github.ref_name }}\" }" \
${{ secrets.EMQX_IO_RELEASE_API }}
- uses: actions/checkout@v3
with:
fetch-depth: 0 # clone full git history
- name: get version
id: version
run: echo "version=$(./pkg-vsn.sh)" >> $GITHUB_OUTPUT