fix: update gitea action
This commit is contained in:
parent
2039b3765d
commit
bd6554d1ee
|
|
@ -7,26 +7,47 @@ jobs:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout
|
||||||
- uses: https://gitea.com/actions/checkout@v4
|
- uses: https://gitea.com/actions/checkout@v4
|
||||||
- uses: https://git.airpig.cn/actions/setup-rust-toolchain@v1
|
|
||||||
|
- name: Setup Rust
|
||||||
|
uses: https://git.airpig.cn/actions/setup-rust-toolchain@v1
|
||||||
|
|
||||||
|
- name: Cache cargo registry and build
|
||||||
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
cache: false
|
path: |
|
||||||
- run: |
|
~/.cargo/bin/
|
||||||
|
~/.cargo/registry/index/
|
||||||
|
~/.cargo/registry/cache/
|
||||||
|
~/.cargo/git/db/
|
||||||
|
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-cargo-registry-
|
||||||
|
|
||||||
|
- name: Build for musl
|
||||||
|
run: |
|
||||||
apt update && apt install -y musl-tools
|
apt update && apt install -y musl-tools
|
||||||
rustup target add x86_64-unknown-linux-musl
|
rustup target add x86_64-unknown-linux-musl
|
||||||
cargo build -r --target x86_64-unknown-linux-musl
|
cargo build -r --target x86_64-unknown-linux-musl
|
||||||
|
|
||||||
- name: Login to hub.airpig.cn
|
- name: Login to hub.airpig.cn
|
||||||
uses: https://gitea.com/docker/login-action@v3
|
uses: https://gitea.com/docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: hub.airpig.cn
|
registry: hub.airpig.cn
|
||||||
username: admin
|
username: admin
|
||||||
password: Chenweijia113!
|
password: Chenweijia113!
|
||||||
- run: |
|
|
||||||
|
- name: Build Docker image and push
|
||||||
|
run: |
|
||||||
ls
|
ls
|
||||||
repo="sched_task"
|
repo="sched_task"
|
||||||
version=$(grep -E '^version' "Cargo.toml" | awk -F'"' '{print $2}')
|
version=$(grep -E '^version' "Cargo.toml" | awk -F'"' '{print $2}')
|
||||||
new_version="v${version}"
|
new_version="v${version}"
|
||||||
docker build -t hub.airpig.cn/library/$repo:$new_version .
|
docker build -t hub.airpig.cn/library/$repo:$new_version .
|
||||||
docker push 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
|
docker rmi hub.airpig.cn/library/$repo:$new_version
|
||||||
- run: echo "This job's status is ${{ job.status }}."
|
|
||||||
|
- name: Check job status
|
||||||
|
run: |
|
||||||
|
echo "This job's status is ${{ job.status }}."
|
||||||
|
|
@ -2039,7 +2039,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sched_tasks_rs"
|
name = "sched_tasks_rs"
|
||||||
version = "1.0.10"
|
version = "1.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"clokwerk",
|
"clokwerk",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "sched_tasks_rs"
|
name = "sched_tasks_rs"
|
||||||
version = "1.0.10"
|
version = "1.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue