From 14c19487e781e24f57906ea72534fea38ae5a7d6 Mon Sep 17 00:00:00 2001 From: pengmao Date: Tue, 14 May 2024 15:03:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0ci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/commitlint.yml | 17 +++++++++-------- docs/.vitepress/config.js | 4 ++++ docs/program/Kuberentes/demoOne.md | 2 +- docs/program/sh/index.md | 9 +++++++++ 4 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 docs/program/sh/index.md diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index 30d773b..ab3b3db 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -11,11 +11,10 @@ jobs: fetch-depth: 0 - name: Install required dependencies run: | - apt update - apt install -y sudo - sudo apt install -y git curl + sudo apt-get update + sudo apt-get install -y git curl curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - - sudo DEBIAN_FRONTEND=noninteractive apt install -y nodejs + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs - name: Print versions run: | git --version @@ -24,13 +23,15 @@ jobs: npx commitlint --version - name: Install commitlint run: | - npm install conventional-changelog-conventionalcommits - npm install commitlint@latest + npm install --save-dev @commitlint/config-conventional @commitlint/cli + - name: Configure commitlint + run: | + echo "module.exports = {extends: ['@commitlint/config-conventional']};" > commitlint.config.js - name: Validate current commit (last commit) with commitlint if: github.event_name == 'push' - run: npx commitlint --last --verbose + run: npx commitlint --from ${GITHUB_SHA}~1 --to ${GITHUB_SHA} --verbose - name: Validate PR commits with commitlint if: github.event_name == 'pull_request' - run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose + run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.sha }} --verbose diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index ae81f6d..288114f 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -128,6 +128,10 @@ export default { text: 'Webpack', items: [{ text: 'Webpack', link: '/program/Webpack/' }] }, + { + text: '命令行', + items: [{ text: 'Sh', link: '/program/sh/' }] + }, { text: '数据结构', items: [ diff --git a/docs/program/Kuberentes/demoOne.md b/docs/program/Kuberentes/demoOne.md index cf6da89..1198506 100644 --- a/docs/program/Kuberentes/demoOne.md +++ b/docs/program/Kuberentes/demoOne.md @@ -313,7 +313,7 @@ kubectl exec -it sh curl podIp:3000 ``` -其中podIp是后端容器的端口,可以通过如下命令查看 +其中podIp是后端容器的IP,可以通过如下命令查看 ```bash kubectl get pod -o wide diff --git a/docs/program/sh/index.md b/docs/program/sh/index.md new file mode 100644 index 0000000..8161685 --- /dev/null +++ b/docs/program/sh/index.md @@ -0,0 +1,9 @@ +# 命令行 + +# windows + +查看文件 + +```bash +ls +```