From b9707568161e8853f8c51d68ddbcc4c1aba89dbe Mon Sep 17 00:00:00 2001 From: Eren Dogan Date: Wed, 15 Feb 2023 21:41:05 -0800 Subject: [PATCH] Push only the latest version tag --- .github/workflows/sync.yml | 6 +++--- .github/workflows/version.yml | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index b3ac219b..a3a1fb20 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -57,10 +57,10 @@ jobs: git tag ${{ env.LATEST_VERSION }} HEAD # Push to private/dev git pull private-repo dev - git push private-repo HEAD:dev --tags + git push private-repo HEAD:dev ${{ env.LATEST_VERSION }} # Push to public-repo/dev git pull public-repo dev - git push public-repo HEAD:dev --tags + git push public-repo HEAD:dev ${{ env.LATEST_VERSION }} # Push to public/stable git pull public-repo stable - git push public-repo HEAD:stable --tags + git push public-repo HEAD:stable ${{ env.LATEST_VERSION }} diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index 18271019..f3ff51cb 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -33,12 +33,14 @@ jobs: git tag "v${NEXT_VERSION}" HEAD - name: Push changes run: | + # Read next tag + export NEXT_TAG="v$(cat VERSION)" # Push to private/dev git pull private-repo dev - git push private-repo HEAD:dev --tags + git push private-repo HEAD:dev ${NEXT_TAG} # Push to public/dev git pull public-repo dev - git push public-repo HEAD:dev --tags + git push public-repo HEAD:dev ${NEXT_TAG} # Push to public/stable git pull public-repo stable - git push public-repo HEAD:stable --tags + git push public-repo HEAD:stable ${NEXT_TAG}