diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cb2329a..bee1dcb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,7 +39,7 @@ jobs: build: needs: test runs-on: ubuntu-latest - if: github.event_name == 'push' + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') steps: - uses: actions/checkout@master @@ -47,10 +47,10 @@ jobs: - name: Get version tag id: get_tag run: | - if [ ${{ startsWith(github.ref, 'refs/tags/') }} = true ]; then - echo "tag=latest,${GITHUB_REF:10}" >>$GITHUB_OUTPUT + if [ ${{ endsWith(github.ref, '-lts') }} = true ]; then + echo "tag=latest-lts,${GITHUB_REF:10}" >>$GITHUB_OUTPUT else - echo "tag=latest" >>$GITHUB_OUTPUT + echo "tag=latest,${GITHUB_REF:10}" >>$GITHUB_OUTPUT fi - name: Publish to Registry