From 44316ee9e3971f3df933165f8b7cedbcee4a6834 Mon Sep 17 00:00:00 2001 From: Codex <570779284@qq.com> Date: Sun, 5 Apr 2026 09:31:36 +0800 Subject: [PATCH] Initialize project template --- .editorconfig | 12 ++++++++++++ .gitea/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ .gitignore | 20 ++++++++++++++++++++ README.md | 10 ++++++++++ 4 files changed, 71 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitea/workflows/ci.yml create mode 100644 .gitignore create mode 100644 README.md diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..1014ba7 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..5dcc908 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +jobs: + smoke: + runs-on: linux-amd64 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Show workspace + run: | + echo "repo: ${GITHUB_REPOSITORY}" + echo "sha: ${GITHUB_SHA}" + pwd + git status --short + find . -maxdepth 2 -type f | sort + + - name: Validate template files + run: | + test -f README.md + test -f .editorconfig + test -f .gitea/workflows/ci.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4a4e9b6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +# OS +.DS_Store +Thumbs.db + +# Editors +.vscode/ +.idea/ + +# Logs +*.log + +# Environment +.env +.env.* + +# Dependencies and build output +node_modules/ +dist/ +build/ +coverage/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..11fcb2d --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# Project Template + +This repository is a Gitea template for starting new projects. + +Included by default: +- `.gitea/workflows/ci.yml` for a basic CI smoke check +- `.editorconfig` for consistent formatting +- `.gitignore` with a few safe defaults + +Use Gitea's "Use this template" action to generate a new repository from it.