From 23d862d17ce17ab93db001f0dc919f6672a77509 Mon Sep 17 00:00:00 2001 From: Cuong Tran Date: Thu, 9 May 2024 23:17:12 +0700 Subject: [PATCH] workflow: fix fetch-depth --- .github/workflows/build_benchmark.yml | 4 +--- .github/workflows/build_preview.yml | 4 +--- .github/workflows/build_push.yml | 2 -- .github/workflows/build_push_preview.yml | 6 ++++-- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_benchmark.yml b/.github/workflows/build_benchmark.yml index 616ae1e87..39e49a0db 100644 --- a/.github/workflows/build_benchmark.yml +++ b/.github/workflows/build_benchmark.yml @@ -61,10 +61,8 @@ jobs: runs-on: ubuntu-latest needs: prepare-build steps: - - name: Clone Repository (r${{ needs.prepare-build.outputs.COMMIT_COUNT }}) + - name: Clone Repository (${{ needs.prepare-build.outputs.TAG_PREFIX }}${{ needs.prepare-build.outputs.COMMIT_COUNT }}) uses: actions/checkout@v4 - with: - fetch-depth: 0 - name: Set up gradle uses: gradle/actions/setup-gradle@v3 diff --git a/.github/workflows/build_preview.yml b/.github/workflows/build_preview.yml index b6a11f40b..bc00324d0 100644 --- a/.github/workflows/build_preview.yml +++ b/.github/workflows/build_preview.yml @@ -68,10 +68,8 @@ jobs: runs-on: ubuntu-latest needs: prepare-build steps: - - name: Clone Repository (r${{ needs.prepare-build.outputs.COMMIT_COUNT }}) + - name: Clone Repository (${{ needs.prepare-build.outputs.TAG_PREFIX }}${{ needs.prepare-build.outputs.COMMIT_COUNT }}) uses: actions/checkout@v4 - with: - fetch-depth: 0 - name: Set up gradle uses: gradle/actions/setup-gradle@v3 diff --git a/.github/workflows/build_push.yml b/.github/workflows/build_push.yml index e04cf7291..c6d1e98ab 100644 --- a/.github/workflows/build_push.yml +++ b/.github/workflows/build_push.yml @@ -26,8 +26,6 @@ jobs: - name: Clone Repository (${{ steps.get_tag.outputs.VERSION_TAG }}) uses: actions/checkout@v4 - with: - fetch-depth: 0 - name: Validate Gradle Wrapper uses: gradle/actions/wrapper-validation@v3 diff --git a/.github/workflows/build_push_preview.yml b/.github/workflows/build_push_preview.yml index caf4065d7..6ed633d8b 100644 --- a/.github/workflows/build_push_preview.yml +++ b/.github/workflows/build_push_preview.yml @@ -27,6 +27,8 @@ jobs: steps: - name: Clone repo uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Validate Gradle Wrapper uses: gradle/wrapper-validation-action@v1 @@ -39,12 +41,12 @@ jobs: commit_count=$(git rev-list --count HEAD) echo "COMMIT_COUNT=$commit_count" >> $GITHUB_OUTPUT - - name: Create Tag + - name: Create Tag 'r${{ steps.prepare_build.outputs.COMMIT_COUNT }}' run: | git tag "r${{ steps.prepare_build.outputs.COMMIT_COUNT }}" git push origin "r${{ steps.prepare_build.outputs.COMMIT_COUNT }}" - - name: Get branch names. + - name: Get branch names id: branch_names uses: tj-actions/branch-names@v8