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 99b5bec commit ca5f753
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ jobs:

build:
runs-on: ubuntu-latest
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 ca5f753

Please sign in to comment.