File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232 with :
3333 repository : tailwindlabs/tailwindcss
3434
35+ - id : strip-v
36+ name : Strip leading “v” from version
37+ run : |
38+ # grab the raw output (e.g. "v4.1.7")
39+ vtag="${{ steps.get-latest-release.outputs.release }}"
40+ # remove one leading “v”
41+ clean_vtag="${vtag#v}"
42+ # expose it as an output
43+ echo "version_no_v=${clean_vtag}" >> $GITHUB_OUTPUT
44+
3545 - name : Build and push Docker image
3646 uses : docker/build-push-action@v4
3747 with :
4050 push : true
4151 tags : |
4252 ghcr.io/scriptogre/tailwindcss:latest
43- ghcr.io/scriptogre/tailwindcss:${{ steps.get-latest-release .outputs.release }}
53+ ghcr.io/scriptogre/tailwindcss:${{ steps.strip-v .outputs.version_no_v }}
4454 build-args : |
45- TAILWINDCSS_VERSION=${{ steps.get-latest-release .outputs.release }}
55+ TAILWINDCSS_VERSION=${{ steps.strip-v .outputs.version_no_v }}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ RUN set -eux; \
1212 ARCH="${platform#*/}" ; \
1313 [ "$ARCH" = "amd64" ] && ARCH=x64; \
1414 [ "$ARCH" = "aarch64" ] && ARCH=arm64; \
15- url="https://github.com/tailwindlabs/tailwindcss/releases/download/${TAILWINDCSS_VERSION}/tailwindcss-${OS}-${ARCH}${TARGETVARIANT}" ; \
15+ url="https://github.com/tailwindlabs/tailwindcss/releases/download/v ${TAILWINDCSS_VERSION#v }/tailwindcss-${OS}-${ARCH}${TARGETVARIANT}" ; \
1616 curl -fSL -o /tmp/tailwindcss "$url" ; \
1717 chmod +x /tmp/tailwindcss
1818
Original file line number Diff line number Diff line change 11rebuild release_version :
22 docker build \
3- - -build-arg TAILWINDCSS_VERSION=v {{ release_version}} \
3+ - -build-arg TAILWINDCSS_VERSION={{ release_version}} \
44 - t ghcr.io/ scriptogre/ tailwindcss:{{ release_version}} \
55 - t ghcr.io/ scriptogre/ tailwindcss:latest \
66 .
You can’t perform that action at this time.
0 commit comments