-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only publish images to repo on tag, distinguish between latest and la…
…test-lts
- Loading branch information
1 parent
14178bd
commit 4910064
Showing
1 changed file
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: Build and build | ||
uses: elgohr/[email protected] | ||
|