Closed shipilovds closed 3 weeks ago
Let's avoid hardcode and start push Docker Images only if a semver tag was pushed to the repo. So, we should set the corresponding trigger:
on:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
and push only if tag was provided:
- name: Build
uses: docker/build-push-action@v6
with:
push: ${{ contains(github.ref, 'refs/tags/') }} # push if tag was set
done