File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,16 +43,22 @@ jobs:
4343 - name : Extract version from tag
4444 id : extract-version
4545 run : |
46- echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
46+ VERSION="${GITHUB_REF_NAME#v}"
47+
48+ TAGS="investbrainapp/investbrain:${VERSION},ghcr.io/investbrainapp/investbrain:${VERSION}"
49+
50+ # Conditionally add 'latest' tags unless 'pre-release' is in the version
51+ if [[ "${GITHUB_REF_NAME}" != *alpha* && "${GITHUB_REF_NAME}" != *beta* && "${GITHUB_REF_NAME}" != *rc* ]]; then
52+ TAGS="$TAGS,investbrainapp/investbrain:latest,ghcr.io/investbrainapp/investbrain:latest"
53+ fi
54+
55+ echo "tags=$TAGS" >> $GITHUB_OUTPUT
4756
4857 - name : Build and push
4958 uses : docker/build-push-action@v6
5059 with :
5160 platforms : linux/amd64,linux/arm64
5261 file : ./docker/Dockerfile
5362 push : true
54- tags : |
55- investbrainapp/investbrain:latest
56- investbrainapp/investbrain:${{ env.version }}
57- ghcr.io/investbrainapp/investbrain:latest
58- ghcr.io/investbrainapp/investbrain:${{ env.version }}
63+ tags : ${{ steps.extract-version.outputs.tags }}
64+
You can’t perform that action at this time.
0 commit comments