diff --git a/.github/workflows/on_merge.yml b/.github/workflows/on_merge.yml index eadaff8..da078e0 100644 --- a/.github/workflows/on_merge.yml +++ b/.github/workflows/on_merge.yml @@ -18,10 +18,12 @@ jobs: run: | echo hello git fetch --all - echo $(git for-each-ref --format='%(refname:short)' refs/heads) - echo $(git for-each-ref --format='%(refname:short)' refs/heads | grep -Po '^v\d.\d(.\d)?$') - echo $(git for-each-ref --format='%(refname:short)' refs/heads | grep -Po '^v\d.\d(.\d)?$' | sort -V | tail -n 1) - echo "DATA_LATEST_VERSION=$(git for-each-ref --format='%(refname:short)' refs/heads | grep -Po '^v\d.\d(.\d)?$' | sort -V | tail -n 1)" >> $GITHUB_ENV + echo $(git for-each-ref --format='%(refname:short)' refs/remotes/origin) + echo $(git for-each-ref --format='%(refname:short)' refs/remotes/origin | grep -Po '(?<=origin/)v\d.\d(.\d)?$') + echo "DATA_LATEST_VERSION=$(git for-each-ref --format='%(refname:short)' refs/remotes/origin \ + | grep -Po '(?<=origin/)v\d.\d(.\d)?$' \ + | sort -V | tail -n 1\ + )" >> $GITHUB_ENV - name: Rebase and push run: |