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]