feat:移除submodule安装流
This commit is contained in:
1
.github/workflows/crowdin-bootstrap.yml
vendored
1
.github/workflows/crowdin-bootstrap.yml
vendored
@@ -36,7 +36,6 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ inputs.base_branch }}
|
ref: ${{ inputs.base_branch }}
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Bootstrap committed target translations into Crowdin
|
- name: Bootstrap committed target translations into Crowdin
|
||||||
uses: crowdin/github-action@v2
|
uses: crowdin/github-action@v2
|
||||||
|
|||||||
3
.github/workflows/crowdin-sync.yml
vendored
3
.github/workflows/crowdin-sync.yml
vendored
@@ -25,8 +25,6 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: Sync translations with Crowdin
|
- name: Sync translations with Crowdin
|
||||||
uses: crowdin/github-action@v2
|
uses: crowdin/github-action@v2
|
||||||
with:
|
with:
|
||||||
@@ -59,7 +57,6 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ matrix.base_branch }}
|
ref: ${{ matrix.base_branch }}
|
||||||
submodules: recursive
|
|
||||||
- name: Sync scheduled translations with Crowdin
|
- name: Sync scheduled translations with Crowdin
|
||||||
uses: crowdin/github-action@v2
|
uses: crowdin/github-action@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
24
.github/workflows/docker-image-dev.yml
vendored
24
.github/workflows/docker-image-dev.yml
vendored
@@ -25,7 +25,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
ref: dev
|
ref: dev
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
# Clone required dependencies
|
# Clone required dependencies
|
||||||
# - name: Clone maim_message
|
# - name: Clone maim_message
|
||||||
@@ -34,17 +33,6 @@ jobs:
|
|||||||
- name: Clone lpmm
|
- name: Clone lpmm
|
||||||
run: git clone https://github.com/Mai-with-u/MaiMBot-LPMM.git MaiMBot-LPMM
|
run: git clone https://github.com/Mai-with-u/MaiMBot-LPMM.git MaiMBot-LPMM
|
||||||
|
|
||||||
- name: Verify A_Memorix submodule alignment
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
git -C plugins/A_memorix fetch origin MaiBot_branch --depth=1
|
|
||||||
LOCAL_SHA=$(git -C plugins/A_memorix rev-parse HEAD)
|
|
||||||
REMOTE_SHA=$(git -C plugins/A_memorix rev-parse FETCH_HEAD)
|
|
||||||
if [ "${LOCAL_SHA}" != "${REMOTE_SHA}" ]; then
|
|
||||||
echo "plugins/A_memorix is stale: local=${LOCAL_SHA}, remote=${REMOTE_SHA}" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
with:
|
with:
|
||||||
@@ -91,7 +79,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
ref: dev
|
ref: dev
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
# Clone required dependencies
|
# Clone required dependencies
|
||||||
# - name: Clone maim_message
|
# - name: Clone maim_message
|
||||||
@@ -100,17 +87,6 @@ jobs:
|
|||||||
- name: Clone lpmm
|
- name: Clone lpmm
|
||||||
run: git clone https://github.com/Mai-with-u/MaiMBot-LPMM.git MaiMBot-LPMM
|
run: git clone https://github.com/Mai-with-u/MaiMBot-LPMM.git MaiMBot-LPMM
|
||||||
|
|
||||||
- name: Verify A_Memorix submodule alignment
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
git -C plugins/A_memorix fetch origin MaiBot_branch --depth=1
|
|
||||||
LOCAL_SHA=$(git -C plugins/A_memorix rev-parse HEAD)
|
|
||||||
REMOTE_SHA=$(git -C plugins/A_memorix rev-parse FETCH_HEAD)
|
|
||||||
if [ "${LOCAL_SHA}" != "${REMOTE_SHA}" ]; then
|
|
||||||
echo "plugins/A_memorix is stale: local=${LOCAL_SHA}, remote=${REMOTE_SHA}" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
24
.github/workflows/docker-image-main.yml
vendored
24
.github/workflows/docker-image-main.yml
vendored
@@ -29,7 +29,6 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
# Clone required dependencies
|
# Clone required dependencies
|
||||||
# - name: Clone maim_message
|
# - name: Clone maim_message
|
||||||
@@ -38,17 +37,6 @@ jobs:
|
|||||||
- name: Clone lpmm
|
- name: Clone lpmm
|
||||||
run: git clone https://github.com/Mai-with-u/MaiMBot-LPMM.git MaiMBot-LPMM
|
run: git clone https://github.com/Mai-with-u/MaiMBot-LPMM.git MaiMBot-LPMM
|
||||||
|
|
||||||
- name: Verify A_Memorix submodule alignment
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
git -C plugins/A_memorix fetch origin MaiBot_branch --depth=1
|
|
||||||
LOCAL_SHA=$(git -C plugins/A_memorix rev-parse HEAD)
|
|
||||||
REMOTE_SHA=$(git -C plugins/A_memorix rev-parse FETCH_HEAD)
|
|
||||||
if [ "${LOCAL_SHA}" != "${REMOTE_SHA}" ]; then
|
|
||||||
echo "plugins/A_memorix is stale: local=${LOCAL_SHA}, remote=${REMOTE_SHA}" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
with:
|
with:
|
||||||
@@ -94,7 +82,6 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
# Clone required dependencies
|
# Clone required dependencies
|
||||||
# - name: Clone maim_message
|
# - name: Clone maim_message
|
||||||
@@ -103,17 +90,6 @@ jobs:
|
|||||||
- name: Clone lpmm
|
- name: Clone lpmm
|
||||||
run: git clone https://github.com/Mai-with-u/MaiMBot-LPMM.git MaiMBot-LPMM
|
run: git clone https://github.com/Mai-with-u/MaiMBot-LPMM.git MaiMBot-LPMM
|
||||||
|
|
||||||
- name: Verify A_Memorix submodule alignment
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
git -C plugins/A_memorix fetch origin MaiBot_branch --depth=1
|
|
||||||
LOCAL_SHA=$(git -C plugins/A_memorix rev-parse HEAD)
|
|
||||||
REMOTE_SHA=$(git -C plugins/A_memorix rev-parse FETCH_HEAD)
|
|
||||||
if [ "${LOCAL_SHA}" != "${REMOTE_SHA}" ]; then
|
|
||||||
echo "plugins/A_memorix is stale: local=${LOCAL_SHA}, remote=${REMOTE_SHA}" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
2
.github/workflows/i18n-validate.yml
vendored
2
.github/workflows/i18n-validate.yml
vendored
@@ -31,8 +31,6 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.12"
|
||||||
|
|||||||
58
.github/workflows/precheck.yml
vendored
58
.github/workflows/precheck.yml
vendored
@@ -7,63 +7,6 @@ permissions:
|
|||||||
issues: write
|
issues: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
submodule-alignment-check:
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
submodules: recursive
|
|
||||||
- name: Validate A_Memorix submodule strict alignment
|
|
||||||
env:
|
|
||||||
SUBMODULE_PATH: plugins/A_memorix
|
|
||||||
SUBMODULE_URL: https://github.com/A-Dawn/A_memorix.git
|
|
||||||
SUBMODULE_BRANCH: MaiBot_branch
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
if [ ! -f .gitmodules ]; then
|
|
||||||
echo "::error::.gitmodules is missing."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
actual_path=$(git config -f .gitmodules --get submodule.plugins/A_memorix.path || true)
|
|
||||||
actual_url=$(git config -f .gitmodules --get submodule.plugins/A_memorix.url || true)
|
|
||||||
actual_branch=$(git config -f .gitmodules --get submodule.plugins/A_memorix.branch || true)
|
|
||||||
|
|
||||||
if [ "${actual_path}" != "${SUBMODULE_PATH}" ]; then
|
|
||||||
echo "::error::submodule path mismatch: expected ${SUBMODULE_PATH}, got ${actual_path:-<empty>}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${actual_url}" != "${SUBMODULE_URL}" ]; then
|
|
||||||
echo "::error::submodule url mismatch: expected ${SUBMODULE_URL}, got ${actual_url:-<empty>}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${actual_branch}" != "${SUBMODULE_BRANCH}" ]; then
|
|
||||||
echo "::error::submodule branch mismatch: expected ${SUBMODULE_BRANCH}, got ${actual_branch:-<empty>}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "${SUBMODULE_PATH}/_manifest.json" ]; then
|
|
||||||
echo "::error::${SUBMODULE_PATH}/_manifest.json is missing. Run: git submodule update --init --recursive"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
git -C "${SUBMODULE_PATH}" remote set-url origin "${SUBMODULE_URL}"
|
|
||||||
git -C "${SUBMODULE_PATH}" fetch origin "${SUBMODULE_BRANCH}" --depth=1
|
|
||||||
|
|
||||||
local_sha=$(git -C "${SUBMODULE_PATH}" rev-parse HEAD)
|
|
||||||
remote_sha=$(git -C "${SUBMODULE_PATH}" rev-parse FETCH_HEAD)
|
|
||||||
|
|
||||||
if [ "${local_sha}" != "${remote_sha}" ]; then
|
|
||||||
echo "::error::submodule ${SUBMODULE_PATH} must match origin/${SUBMODULE_BRANCH} HEAD."
|
|
||||||
echo "local=${local_sha} remote=${remote_sha}"
|
|
||||||
echo "Please run: git submodule update --remote --recursive ${SUBMODULE_PATH} && git add ${SUBMODULE_PATH} && git commit"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
conflict-check:
|
conflict-check:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
outputs:
|
outputs:
|
||||||
@@ -73,7 +16,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
submodules: recursive
|
|
||||||
- name: Check Conflicts
|
- name: Check Conflicts
|
||||||
id: check-conflicts
|
id: check-conflicts
|
||||||
env:
|
env:
|
||||||
|
|||||||
2
.github/workflows/publish-webui-dist.yml
vendored
2
.github/workflows/publish-webui-dist.yml
vendored
@@ -19,8 +19,6 @@ jobs:
|
|||||||
environment: webui
|
environment: webui
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Setup Bun
|
- name: Setup Bun
|
||||||
uses: oven-sh/setup-bun@v2
|
uses: oven-sh/setup-bun@v2
|
||||||
|
|||||||
1
.github/workflows/ruff-pr.yml
vendored
1
.github/workflows/ruff-pr.yml
vendored
@@ -17,7 +17,6 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: recursive
|
|
||||||
- name: Install Ruff and Run Checks
|
- name: Install Ruff and Run Checks
|
||||||
uses: astral-sh/ruff-action@v3
|
uses: astral-sh/ruff-action@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
1
.github/workflows/ruff.yml
vendored
1
.github/workflows/ruff.yml
vendored
@@ -23,7 +23,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: ${{ github.head_ref || github.ref_name }}
|
ref: ${{ github.head_ref || github.ref_name }}
|
||||||
submodules: recursive
|
|
||||||
- name: Install Ruff and Run Checks
|
- name: Install Ruff and Run Checks
|
||||||
uses: astral-sh/ruff-action@v3
|
uses: astral-sh/ruff-action@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user