diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 8226543..9d40511 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -29,8 +29,10 @@ jobs: steps: - name: Checkout run: | - git clone --depth=1 --branch="${GITHUB_REF_NAME}" "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" . - git checkout "${GITHUB_SHA}" + git init + git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" + git fetch --depth=1 origin "${GITHUB_SHA}" + git checkout FETCH_HEAD - run: rustup component add rustfmt - run: cargo fmt --check @@ -42,8 +44,10 @@ jobs: steps: - name: Checkout run: | - git clone --depth=1 --branch="${GITHUB_REF_NAME}" "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" . - git checkout "${GITHUB_SHA}" + git init + git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" + git fetch --depth=1 origin "${GITHUB_SHA}" + git checkout FETCH_HEAD - run: rustup component add clippy # Lint both feature sets independently - name: Clippy (server) @@ -59,8 +63,10 @@ jobs: steps: - name: Checkout run: | - git clone --depth=1 --branch="${GITHUB_REF_NAME}" "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" . - git checkout "${GITHUB_SHA}" + git init + git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" + git fetch --depth=1 origin "${GITHUB_SHA}" + git checkout FETCH_HEAD - run: cargo install cargo-audit - run: cargo audit @@ -76,8 +82,10 @@ jobs: steps: - name: Checkout run: | - git clone --depth=1 --branch="${GITHUB_REF_NAME}" "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" . - git checkout "${GITHUB_SHA}" + git init + git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" + git fetch --depth=1 origin "${GITHUB_SHA}" + git checkout FETCH_HEAD - name: Run tests (server) run: cargo test --features server --no-default-features - name: Run tests (web) @@ -97,8 +105,10 @@ jobs: steps: - name: Checkout run: | - git clone --depth=1 --branch="${GITHUB_REF_NAME}" "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" . - git checkout "${GITHUB_SHA}" + git init + git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" + git fetch --depth=1 origin "${GITHUB_SHA}" + git checkout FETCH_HEAD - name: Determine image tag id: tag