mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2025-12-28 00:42:56 +00:00
* ci: safe ci using zizmor check Signed-off-by: yihong0618 <zouzou0208@gmail.com> * fix: lines empty Signed-off-by: yihong0618 <zouzou0208@gmail.com> * fix: delete useless code Signed-off-by: yihong0618 <zouzou0208@gmail.com> --------- Signed-off-by: yihong0618 <zouzou0208@gmail.com>
36 lines
842 B
YAML
36 lines
842 B
YAML
name: Check Dependencies
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
check-dependencies:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set up Rust
|
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
|
|
- name: Run cargo tree
|
|
run: cargo tree --prefix none > dependencies.txt
|
|
|
|
- name: Extract dependency names
|
|
run: awk '{print $1}' dependencies.txt > dependency_names.txt
|
|
|
|
- name: Check for blacklisted crates
|
|
run: |
|
|
while read -r dep; do
|
|
if grep -qFx "$dep" dependency_names.txt; then
|
|
echo "Blacklisted crate '$dep' found in dependencies."
|
|
exit 1
|
|
fi
|
|
done < .github/cargo-blacklist.txt
|
|
echo "No blacklisted crates found."
|