mirror of
https://github.com/SinTan1729/chhoto-url.git
synced 2025-12-05 21:10:23 -08:00
chg: Use minify in place
This commit is contained in:
7
.github/workflows/docker-release.yml
vendored
7
.github/workflows/docker-release.yml
vendored
@@ -68,15 +68,12 @@ jobs:
|
||||
mv $f/chhoto-url actix/target/$f/release/
|
||||
chmod +x actix/target/$f/release/chhoto-url
|
||||
done
|
||||
- name: Move resouces to expected place without minifying
|
||||
if: github.ref_type != 'tag'
|
||||
run: mv resources/ resources-final/
|
||||
- name: Minify resources
|
||||
- name: Minify resources for release
|
||||
if: github.ref_type == 'tag'
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install minify
|
||||
minify -rs -o resources-final/ resources/
|
||||
minify -rsi resources/
|
||||
- name: Display current directory structure
|
||||
run: ls -R
|
||||
- name: Log in to the Docker Hub
|
||||
|
||||
@@ -12,7 +12,7 @@ COPY ./actix/target/armv7-unknown-linux-musleabihf/release/chhoto-url /chhoto-ur
|
||||
|
||||
ARG TARGETARCH
|
||||
FROM builder-$TARGETARCH
|
||||
COPY ./resources-final /resources
|
||||
COPY ./resources /resources
|
||||
|
||||
ENTRYPOINT ["/chhoto-url"]
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ COPY ./actix/target/armv7-unknown-linux-musleabihf/release/chhoto-url /chhoto-ur
|
||||
|
||||
ARG TARGETARCH
|
||||
FROM builder-$TARGETARCH
|
||||
COPY ./resources-final /resources
|
||||
COPY ./resources /resources
|
||||
|
||||
ENTRYPOINT ["/chhoto-url"]
|
||||
|
||||
|
||||
4
Makefile
4
Makefile
@@ -61,14 +61,14 @@ endif
|
||||
# v_minor := $(shell cat actix/Cargo.toml | sed -rn 's/^version = "(.+)\..+"$$/\1/p')
|
||||
# v_major := $(shell cat actix/Cargo.toml | sed -rn 's/^version = "(.+)\..+\..+"$$/\1/p')
|
||||
# docker-release: tag build-release
|
||||
# minify -rs -o resources-final/ resources/
|
||||
# minify -rsi resources/
|
||||
# docker buildx build --push --tag ${docker_username}/chhoto-url:${v_major} --tag ${docker_username}/chhoto-url:${v_minor} \
|
||||
# --tag ${docker_username}/chhoto-url:${v_patch} --tag ${docker_username}/chhoto-url:latest \
|
||||
# --platform linux/amd64,linux/arm64,linux/arm/v7 -f Dockerfile.alpine .
|
||||
# docker buildx build --push --tag ghcr.io/${github_username}/chhoto-url:${v_major} --tag ghcr.io/${github_username}/chhoto-url:${v_minor} \
|
||||
# --tag ghcr.io/${github_username}/chhoto-url:${v_patch} --tag ghcr.io/${github_username}/chhoto-url:latest \
|
||||
# --platform linux/amd64,linux/arm64,linux/arm/v7 -f Dockerfile.scratch .
|
||||
# rm -rf resources-final/
|
||||
# git restore resources/
|
||||
|
||||
clean:
|
||||
docker ps -q --filter "name=chhoto-url" | xargs -r docker stop
|
||||
|
||||
Reference in New Issue
Block a user