From a48c75594e5427b8c0717188be1fd2a3962a4906 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Mon, 14 Nov 2022 08:49:03 +0100 Subject: [PATCH] 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 --- .github/workflows/build_packages.yaml | 1 + .github/workflows/build_slim_packages.yaml | 4 ++++ .github/workflows/release.yaml | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/.github/workflows/build_packages.yaml b/.github/workflows/build_packages.yaml index 38c1ea472..4d82c4f0e 100644 --- a/.github/workflows/build_packages.yaml +++ b/.github/workflows/build_packages.yaml @@ -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 diff --git a/.github/workflows/build_slim_packages.yaml b/.github/workflows/build_slim_packages.yaml index c542e0197..65f3c760d 100644 --- a/.github/workflows/build_slim_packages.yaml +++ b/.github/workflows/build_slim_packages.yaml @@ -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: | diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c7446eaa1..c8065cd0c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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