Skip to content

Commit

Permalink
[OPT]build app (#24)
Browse files Browse the repository at this point in the history
* fix

* [ImgBot] Optimize images

*Total -- 435.32kb -> 276.76kb (36.42%)

/otherfile/images/config.png -- 20.77kb -> 11.67kb (43.81%)
/otherfile/images/history_index.png -- 414.56kb -> 265.09kb (36.05%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

* [Opt][Incomplete]Optimize history processing

* [FIX][Build APP]Rclone

* [ADD]Support Devices History Display

* [OPT][FIX][BUILDAPP]

---------

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
  • Loading branch information
thun888 and ImgBotApp committed Mar 24, 2024
1 parent 9a2b735 commit 002fc53
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/buildapp-dev.yml
Expand Up @@ -78,3 +78,5 @@ jobs:
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6
push: true
tags: thun888/mirouter-ui:dev
build-args: |
VERSION=${{ github.sha }}
19 changes: 8 additions & 11 deletions .github/workflows/buildapp.yml
Expand Up @@ -131,7 +131,7 @@ jobs:
curl \
-H "Authorization: token ${{ secrets.TOKEN }}" \
-H "Content-Type: $(file -b --mime-type $file)" \
--data-binary @"$file" \
-F "file=@$file" \
"${{ steps.create_release.outputs.upload_url }}=$(basename $file)"
fi
done
Expand All @@ -157,26 +157,23 @@ jobs:
builddocker:
runs-on: ubuntu-20.04
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Docker Hub
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
-
name: Build and push
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6
push: true
tags: thun888/mirouter-ui:latest
build-args: |
VERSION=${{ github.event.inputs.version }}
4 changes: 2 additions & 2 deletions Dockerfile
@@ -1,12 +1,12 @@
FROM golang:1.21.0-alpine3.18 AS builder
ARG VERSION

WORKDIR /app

COPY . .

RUN go mod download

RUN go build -ldflags "-X 'main.Version=Docker'" -o main .
RUN go build -ldflags "-X 'main.Version=$VERSION'" -o main .

FROM alpine:3.18

Expand Down

0 comments on commit 002fc53

Please sign in to comment.