From 95088c95dd2d2002401e00f9e25b764848d0a7ba Mon Sep 17 00:00:00 2001 From: xkeyC <39891083+xkeyC@users.noreply.github.com> Date: Thu, 28 Nov 2024 18:21:18 +0800 Subject: [PATCH] feat: runner --- .github/workflows/pr_check.yml | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/pr_check.yml diff --git a/.github/workflows/pr_check.yml b/.github/workflows/pr_check.yml new file mode 100644 index 0000000..670dcc9 --- /dev/null +++ b/.github/workflows/pr_check.yml @@ -0,0 +1,37 @@ +name: PR Check + +on: + pull_request: + types: [opened, synchronize, reopened] + branches: + - '**' + workflow_dispatch: + +jobs: + rust-pr-check: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Rust + uses: dtolnay/rust-toolchain@stable + + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + with: + cache-all-crates: true + prefix-key: "rs_cache" + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + shared-key: "share" + + - name: Setup localization runner tools + run: cargo install --git https://github.com/StarCitizenToolBox/runner_tools.git --tag v1.0.0 localization + + - name: PR Check + env: + GH_REPO: ${{ github.repository }} + GH_PR_NUMBER: ${{ github.event.pull_request.id }} + GH_PR_TITLE: ${{ github.event.pull_request.title }} + run: localization -m pr_check \ No newline at end of file