File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
actions/docker-build-and-push Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 3232
3333 - name : Build image
3434 run : |
35+ if [[ ${{ inputs.prerelease }} ]]; then
36+ LATEST_TAG=""
37+ else
38+ LATEST_TAG="-t ${{ inputs.registry }}/${{ inputs.image-name }}:latest"
39+ fi
3540 docker buildx build \
3641 --platform linux/amd64,linux/arm64 \
3742 -t ${{ inputs.registry }}/${{ inputs.image-name }}:${{ inputs.tag }} \
38- -t ${{ inputs.registry }}/${{ inputs.image-name }}:latest \
39- --push .
43+ ${LATEST_TAG} --push .
4044 shell : bash
Original file line number Diff line number Diff line change 3333 else
3434 echo "tag=latest" >> "$GITHUB_OUTPUT"
3535 fi
36+ PRE_RELEASE=${{ github.event_name != 'release' || github.event.release.prerelease }}
37+ echo "prerelease=${PRE_RELEASE}" >> "$GITHUB_OUTPUT"
3638 shell : bash
3739
3840 - name : Build and push image
4244 image-name : ${{ steps.version.outputs.project_name }}
4345 registry : ghcr.io/llm-d
4446 github-token : ${{ secrets.GHCR_TOKEN }}
47+ prerelease : ${{ steps.tag.outputs.prerelease }}
4548
4649 - name : Run Trivy scan
4750 uses : ./.github/actions/trivy-scan
You can’t perform that action at this time.
0 commit comments