From 1bb8a214c9ffd2a794dc4e87cb147bfdd7df430c Mon Sep 17 00:00:00 2001 From: CptMoore <39010654+CptMoore@users.noreply.github.com> Date: Mon, 31 Jul 2023 00:28:42 +0200 Subject: [PATCH] Update build.yml --- .github/workflows/build.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eef17f2e..d05169d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -198,14 +198,17 @@ jobs: tag_name: "latest" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Checkout Repo + if: github.ref == 'refs/heads/master' + uses: actions/checkout@v3 + with: + path: source + fetch-depth: 1 + sparse-checkout: 'README.md' - name: Create Latest Tag if: github.ref == 'refs/heads/master' + working-directory: source run: | - # filter tree is what makes this fast - git clone --config transfer.fsckobjects=false --tags --no-checkout --filter=tree:0 \ - "https://github.com/$GITHUB_REPOSITORY" \ - source - cd source git tag -d latest || true git tag latest git push origin latest