Skip to content

Commit

Permalink
Distinguish between latest and latest-lts
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Oct 20, 2023
1 parent 5bba62b commit a07cd8a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ 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

- 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
Expand Down

0 comments on commit a07cd8a

Please sign in to comment.