-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2cf9894
Showing
658 changed files
with
57,058 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.js linguist-language=html | ||
*.ejs linguist-language=html | ||
*.md linguist-detectable=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ko_fi: jaywcjlove | ||
buy_me_a_coffee: jaywcjlove | ||
custom: ["https://www.paypal.me/kennyiseeyou", "https://jaywcjlove.github.io/#/sponsor"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,228 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Generate Contributors Images | ||
uses: jaywcjlove/github-action-contributors@main | ||
id: contributors | ||
with: | ||
filter-author: (renovate\[bot\]|renovate-bot|@github-actions-bot|dependabot\[bot\]) | ||
avatarSize: 42 | ||
|
||
- name: Modify README.md | ||
uses: jaywcjlove/github-action-modify-file-content@main | ||
with: | ||
path: README.md | ||
openDelimiter: '<!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT-->' | ||
closeDelimiter: '<!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT-END-->' | ||
body: | | ||
${{steps.contributors.outputs.htmlList}} | ||
- name: Modify contributors.ejs | ||
uses: jaywcjlove/github-action-modify-file-content@main | ||
with: | ||
path: template/contributors.ejs | ||
openDelimiter: '<!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT-->' | ||
closeDelimiter: '<!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT-END-->' | ||
body: | | ||
${{steps.contributors.outputs.htmlList}} | ||
- run: npm install | ||
- run: npm run dash | ||
- run: cp CONTRIBUTORS.svg .deploy | ||
|
||
- name: Build Linux Command | ||
run: | | ||
npm install | ||
npm run dash | ||
cp CONTRIBUTORS.svg .deploy | ||
- name: Create Tag | ||
id: create_tag | ||
uses: jaywcjlove/create-tag-action@main | ||
with: | ||
package-path: ./package.json | ||
|
||
- name: Get Tag Version | ||
id: tag_version | ||
uses: jaywcjlove/changelog-generator@main | ||
|
||
- name: Update Dash Feed | ||
run: | | ||
echo "<entry><version>${{steps.create_tag.outputs.versionNumber}}</version><url>https://jaywcjlove.github.io/linux-command/linux-command.docset.tgz</url></entry>" > .deploy/linux-command-docset.xml | ||
- name: Generate Changelog | ||
id: changelog | ||
uses: jaywcjlove/changelog-generator@main | ||
with: | ||
filter-author: (小弟调调™) | ||
filter: (^[\s]+?[R|r]elease)|(^[R|r]elease) | ||
|
||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
if: steps.create_tag.outputs.successful | ||
with: | ||
allowUpdates: true | ||
artifacts: '.deploy/linux-command.docset.tgz' | ||
draft: false | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
name: ${{ steps.create_tag.outputs.version }} | ||
tag: ${{ steps.create_tag.outputs.version }} | ||
body: | | ||
[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/linux-command@${{steps.create_tag.outputs.versionNumber}}/file/README.md) [![npm bundle size](https://img.shields.io/bundlephobia/minzip/linux-command)](https://bundlephobia.com/result?p=linux-command@${{steps.create_tag.outputs.versionNumber}}) | ||
```bash | ||
npm i linux-command@${{steps.create_tag.outputs.versionNumber}} | ||
``` | ||
${{ steps.changelog.outputs.compareurl }} | ||
${{ steps.changelog.outputs.changelog }} | ||
Document linux-command@${{ steps.changelog.outputs.tag }}: | ||
https://raw.githack.com/jaywcjlove/linux-command/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html | ||
## Docker | ||
[![Docker Image Version (latest by date)](https://img.shields.io/docker/v/wcjiang/linux-command)](https://hub.docker.com/r/wcjiang/linux-command) [![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/wcjiang/linux-command)](https://hub.docker.com/r/wcjiang/linux-command) [![Docker Pulls](https://img.shields.io/docker/pulls/wcjiang/linux-command)](https://hub.docker.com/r/wcjiang/linux-command) | ||
轻松通过 `docker` 部署 `linux-command` 网站。 | ||
```bash | ||
docker pull wcjiang/linux-command | ||
``` | ||
```bash | ||
docker run --name linux-command --rm -d -p 9665:3000 wcjiang/linux-command:latest | ||
# Or | ||
docker run --name linux-command -itd -p 9665:3000 wcjiang/linux-command:latest | ||
``` | ||
在浏览器中访问以下 URL | ||
```bash | ||
http://localhost:9665/ | ||
``` | ||
- run: rm -rf .deploy/linux-command.docset | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
commit_message: '[${{steps.tag_version.outputs.tag}}] ${{ github.event.head_commit.message }}' | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./.deploy | ||
user_name: github-actions[bot] | ||
user_email: github-actions[bot]@users.noreply.github.com | ||
|
||
- run: npm publish --access public --provenance | ||
continue-on-error: true | ||
name: 📦 linux-command publish to NPM | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
|
||
# Create Docker Image | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USER }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push image:latest | ||
uses: docker/build-push-action@v6 | ||
with: | ||
push: true | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
tags: ${{ secrets.DOCKER_USER }}/linux-command:latest | ||
|
||
- name: Build and push image:tags | ||
uses: docker/build-push-action@v6 | ||
if: steps.create_tag.outputs.successful | ||
with: | ||
push: true | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
tags: ${{ secrets.DOCKER_USER }}/linux-command:${{steps.changelog.outputs.version}} | ||
|
||
# # Create Docker Image in Github | ||
# - name: Login to the GitHub Container Registry | ||
# uses: docker/login-action@v2 | ||
# with: | ||
# registry: ghcr.io | ||
# username: ${{ github.actor }} | ||
# password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# - name: Build and push image:latest | ||
# uses: docker/build-push-action@v6 | ||
# with: | ||
# push: true | ||
# context: . | ||
# platforms: linux/amd64,linux/arm64 | ||
# tags: ghcr.io/jaywcjlove/linux-command:latest | ||
|
||
# - name: Build and push image:tags | ||
# uses: docker/build-push-action@v6 | ||
# if: steps.create_tag.outputs.successful | ||
# with: | ||
# push: true | ||
# context: . | ||
# platforms: linux/amd64,linux/arm64 | ||
# tags: ghcr.io/jaywcjlove/linux-command:${{steps.changelog.outputs.version}} | ||
|
||
# # Create Docker Image | ||
# - name: Docker login | ||
# run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
# - name: Build linux-command image | ||
# run: | | ||
# rm -rf .deploy/linux-command.docset.tgz | ||
# docker image build -t linux-command . | ||
|
||
# - name: Tags & Push image(latest) | ||
# run: | | ||
# docker tag linux-command ${{ secrets.DOCKER_USER }}/linux-command:latest | ||
# docker push ${{ secrets.DOCKER_USER }}/linux-command:latest | ||
|
||
# - name: Tags & Push image | ||
# if: steps.create_tag.outputs.successful | ||
# run: | | ||
# echo "outputs.tag - ${{ steps.changelog.outputs.version }}" | ||
# docker tag linux-command ${{ secrets.DOCKER_USER }}/linux-command:${{steps.changelog.outputs.version}} | ||
# docker push ${{ secrets.DOCKER_USER }}/linux-command:${{steps.changelog.outputs.version}} | ||
|
||
# # Create Docker Image in Github | ||
# - name: Login to GitHub registry | ||
# run: echo ${{ github.token }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin | ||
|
||
# - name: Build docker image | ||
# run: docker build -t ghcr.io/jaywcjlove/linux-command:latest . | ||
|
||
# - name: Publish to GitHub registry | ||
# run: docker push ghcr.io/jaywcjlove/linux-command:latest | ||
|
||
# - name: Tag docker image (beta) and publish to GitHub registry | ||
# if: steps.create_tag.outputs.successful | ||
# run: | | ||
# echo "version: v${{ steps.changelog.outputs.version }}" | ||
# docker tag ghcr.io/jaywcjlove/linux-command:latest ghcr.io/jaywcjlove/linux-command:${{steps.changelog.outputs.version}} | ||
# docker push ghcr.io/jaywcjlove/linux-command:${{steps.changelog.outputs.version}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Upstream Sync | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" # every day | ||
workflow_dispatch: | ||
|
||
jobs: | ||
sync_latest_from_upstream: | ||
name: Sync latest commits from upstream repo | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.repository.fork }} | ||
|
||
steps: | ||
# Step 1: run a standard checkout action | ||
- name: Checkout target repo | ||
uses: actions/checkout@v4 | ||
|
||
# Step 2: run the sync action | ||
- name: Sync upstream changes | ||
id: sync | ||
uses: aormsby/[email protected] | ||
with: | ||
upstream_sync_repo: jaywcjlove/linux-command | ||
upstream_sync_branch: master | ||
target_sync_branch: master | ||
target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set | ||
|
||
# Set test_mode true to run tests instead of the true action!! | ||
test_mode: false | ||
|
||
- name: Sync check | ||
if: failure() | ||
run: | | ||
echo "[Error] 由于上游仓库的 workflow 文件变更,导致 GitHub 自动暂停了本次自动更新,你需要手动 Sync Fork 一次。" | ||
echo "[Error] Due to a change in the workflow file of the upstream repository, GitHub has automatically suspended the scheduled automatic update. You need to manually sync your fork." | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules | ||
npm-debug.log | ||
package-lock.json | ||
.deploy | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
assets | ||
build/ | ||
node_modules/ | ||
template/ | ||
.deploy | ||
.DS_Store | ||
.gitattributes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# 贡献者约定 | ||
|
||
感谢您对本项目提交贡献,为了便于维护者管理,请各位维护人员遵循以下约定 | ||
|
||
## 如果您希望提交一个命令 | ||
|
||
命令的存放位置在 `./command/` 文件夹中 | ||
|
||
1. 在这里创建一个 `[CommandName].md` 文件,比如 `pacman.md` | ||
2. 打开文件,键入指令在终端中执行的命令 | ||
3. 第二行输入三个等号 | ||
4. 创建二级标题“补充说明”,并且在这个标题下面创建至少下面几个三级标题 | ||
- 语法 | ||
- 选项 | ||
- 参数 | ||
|
||
按照预期,文档应该是这样的 | ||
|
||
```markdown | ||
CommandName | ||
=== | ||
|
||
这里是命令介绍,它可以被搜索到,如果你有个流行的应用,包含多个命令,可放到这里,以便搜索到对应的命令 | ||
|
||
## 补充说明 | ||
|
||
**CommandName命令** 是用于演示的文档 | ||
|
||
### 语法 | ||
|
||
(具体编写文档时,请使用 shell 代码块包裹以下内容) | ||
|
||
CommandName <-abcdABCD> <必选参数> [可选参数] | ||
|
||
### 选项 | ||
|
||
(具体编写文档时,请使用 shell 代码块包裹以下内容) | ||
|
||
-a xxxxx | ||
-b xxxxx | ||
... | ||
-C xxxxx | ||
-D xxxxx | ||
|
||
### 参数 | ||
|
||
(具体编写文档时,请使用 shell 代码块包裹以下内容) | ||
|
||
可选参数:一般情况下可以不给出 | ||
|
||
``` | ||
|
||
## 如果您希望维护前端页面 | ||
|
||
- 请确保您的代码可以完整的运行在最新的 Chromium 和 Safari 浏览器 (#489) | ||
|
||
## 对于提交信息的其他规范 | ||
|
||
- 约定式提交 <https://www.conventionalcommits.org/zh-hans/v1.0.0/> | ||
- 中文文案排版指北 <https://github.com/sparanoid/chinese-copywriting-guidelines/blob/master/README.zh-Hans.md> | ||
- 扉页 — Google 开源项目风格指南 <https://zh-google-styleguide.readthedocs.io/en/latest/google-shell-styleguide/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# https://lipanski.com/posts/smallest-docker-image-static-website | ||
# https://github.com/forksss/docker-static-website | ||
FROM wcjiang/docker-static-website:latest | ||
|
||
# Copy the static website | ||
# Use the .dockerignore file to control what ends up inside the image! | ||
COPY ./.deploy . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright © 2019 小弟调调™ | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.