diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index f87948d..8226543 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -27,7 +27,10 @@ jobs: container: image: rust:1.89-bookworm steps: - - uses: https://gitea.com/https://gitea.com/actions/checkout@v4 + - name: Checkout + run: | + git clone --depth=1 --branch="${GITHUB_REF_NAME}" "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" . + git checkout "${GITHUB_SHA}" - run: rustup component add rustfmt - run: cargo fmt --check @@ -37,7 +40,10 @@ jobs: container: image: rust:1.89-bookworm steps: - - uses: https://gitea.com/https://gitea.com/actions/checkout@v4 + - name: Checkout + run: | + git clone --depth=1 --branch="${GITHUB_REF_NAME}" "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" . + git checkout "${GITHUB_SHA}" - run: rustup component add clippy # Lint both feature sets independently - name: Clippy (server) @@ -51,7 +57,10 @@ jobs: container: image: rust:1.89-bookworm steps: - - uses: https://gitea.com/actions/checkout@v4 + - name: Checkout + run: | + git clone --depth=1 --branch="${GITHUB_REF_NAME}" "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" . + git checkout "${GITHUB_SHA}" - run: cargo install cargo-audit - run: cargo audit @@ -65,7 +74,10 @@ jobs: container: image: rust:1.89-bookworm steps: - - uses: https://gitea.com/actions/checkout@v4 + - name: Checkout + run: | + git clone --depth=1 --branch="${GITHUB_REF_NAME}" "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" . + git checkout "${GITHUB_SHA}" - name: Run tests (server) run: cargo test --features server --no-default-features - name: Run tests (web) @@ -83,7 +95,10 @@ jobs: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) steps: - - uses: https://gitea.com/actions/checkout@v4 + - name: Checkout + run: | + git clone --depth=1 --branch="${GITHUB_REF_NAME}" "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" . + git checkout "${GITHUB_SHA}" - name: Determine image tag id: tag