From a093d0fa8806aaef7bd2d16a0fca92edcba13a90 Mon Sep 17 00:00:00 2001 From: chenwj Date: Tue, 3 Sep 2024 09:28:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0Cargo=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E4=BF=A1=E6=81=AF=E5=8F=8Aaction=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build.yml | 23 ++++++++++++++++++++++- Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 0c84fbd..ecd9d37 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -17,4 +17,25 @@ jobs: steps: - uses: https://gitea.com/actions/checkout@v4 - uses: https://git.airpig.cn/actions/setup-rust-toolchain@v1 - - run: cargo build \ No newline at end of file + with: + target: x86_64-unknown-linux-musl + - run: cargo build -r --target x86_64-unknown-linux-musl + + build-docker-image: + name: Build Docker image + runs-on: ubuntu-latest + steps: + - name: Login to hub.airpig.cn + uses: https://gitea.com/docker/login-action@v3 + with: + registry: hub.airpig.cn + username: admin + password: Chenweijia113! + - run: | + repo="sched_task" + version=$(grep -oP '(?<=version = ")(.*)(?=")' "Cargo.toml") + new_version="v${version}" + docker build -t hub.airpig.cn/library/$repo:$new_version . + docker push hub.airpig.cn/library/$repo:$new_version + docker rmi hub.airpig.cn/library/$repo:$new_version + - run: echo "This job's status is ${{ job.status }}. \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index a17ca2d..0c0f7c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2039,7 +2039,7 @@ dependencies = [ [[package]] name = "sched_tasks_rs" -version = "0.1.0" +version = "1.0.7" dependencies = [ "chrono", "clokwerk", diff --git a/Cargo.toml b/Cargo.toml index fb6b4c8..8df4f87 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sched_tasks_rs" -version = "0.1.0" +version = "1.0.7" edition = "2021" [dependencies]