Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
* upstream/main: (21 commits)
  `zh-cn` translation for usage docs (go-gitea#24897)
  Add chinese documentations for installation (go-gitea#24904)
  Improve RunMode / dev mode (go-gitea#24886)
  Add chinese documentations for `Packages` (go-gitea#24914)
  Rework notifications list (go-gitea#24812)
  New webhook trigger for receiving Pull Request review requests (go-gitea#24481)
  Use file filters action instead of Github's files filter (go-gitea#24877)
  Update Asciidoc markup example with safe defaults (go-gitea#24920)
  Add self to maintainers (go-gitea#23644)
  Create pull request for base after editing file, if not enabled on fork (go-gitea#24841)
  Reduce verbosity of dev commands (go-gitea#24917)
  Merge different languages for language stats (go-gitea#24900)
  Add missing test case and fix typo in tests (go-gitea#24915)
  Improve confusable character string (go-gitea#24911)
  Improve Actions CSS (go-gitea#24864)
  Fix <empty> in administration/config-cheat-sheet.en-us.md (go-gitea#24905)
  Only validate changed columns when update user (go-gitea#24867)
  Rename docs packages title from xxx Packages Repository -> xxx Package Registry (go-gitea#24895)
  Fix can’t move anymore items in repo project boards (go-gitea#24892)
  Make environment-to-ini  support loading key value from file (go-gitea#24832)
  ...

# Conflicts:
#	web_src/css/helpers.css
  • Loading branch information
zjjhot committed May 25, 2023
2 parents a8c87a0 + 69eb92a commit 0f56349
Show file tree
Hide file tree
Showing 163 changed files with 7,141 additions and 722 deletions.
2 changes: 1 addition & 1 deletion .air.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ root = "."
tmp_dir = ".air"

[build]
cmd = "make backend"
cmd = "make --no-print-directory backend"
bin = "gitea"
delay = 1000
include_ext = ["go", "tmpl"]
Expand Down
15 changes: 15 additions & 0 deletions .github/file-filters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
docs: &docs
- "**/*.md"
- "docs/**"

backend: &backend
- "**/*.go"
- "**/*.tmpl"
- "go.mod"
- "go.sum"

frontend: &frontend
- "**/*.js"
- "web_src/**"
- "package.json"
- "package-lock.json"
32 changes: 32 additions & 0 deletions .github/workflows/files-changed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: files changed

on:
workflow_call:
outputs:
docs:
description: "whether docs files changed"
value: ${{ jobs.files-changed.outputs.docs }}
backend:
description: "whether backend files changed"
value: ${{ jobs.files-changed.outputs.backend }}
frontend:
description: "whether frontend files changed"
value: ${{ jobs.files-changed.outputs.frontend }}

jobs:
files-changed:
name: detect which files changed
runs-on: ubuntu-latest
timeout-minutes: 3
# Map a step output to a job output
outputs:
docs: ${{ steps.changes.outputs.docs }}
backend: ${{ steps.changes.outputs.backend }}
frontend: ${{ steps.changes.outputs.frontend }}
steps:
- uses: actions/checkout@v3
- name: Check for backend file changes
uses: dorny/paths-filter@v2
id: changes
with:
filters: .github/file-filters.yml
8 changes: 5 additions & 3 deletions .github/workflows/pull-compliance-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ name: compliance-docs

on:
pull_request:
paths:
- "docs/**"
- "*.md"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
files-changed:
uses: ./.github/workflows/files-changed.yml

compliance-docs:
if: needs.files-changed.outputs.docs == 'true'
needs: files-changed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
43 changes: 0 additions & 43 deletions .github/workflows/pull-compliance-docsignore.yml

This file was deleted.

18 changes: 15 additions & 3 deletions .github/workflows/pull-compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ name: compliance

on:
pull_request:
paths-ignore:
- "docs/**"
- "*.md"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
files-changed:
uses: ./.github/workflows/files-changed.yml

lint-backend:
if: needs.files-changed.outputs.backend == 'true'
needs: files-changed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -24,6 +26,8 @@ jobs:
env:
TAGS: bindata sqlite sqlite_unlock_notify
lint-go-windows:
if: needs.files-changed.outputs.backend == 'true'
needs: files-changed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -38,6 +42,8 @@ jobs:
GOOS: windows
GOARCH: amd64
lint-go-gogit:
if: needs.files-changed.outputs.backend == 'true'
needs: files-changed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -50,6 +56,8 @@ jobs:
env:
TAGS: bindata gogit sqlite sqlite_unlock_notify
checks-backend:
if: needs.files-changed.outputs.backend == 'true'
needs: files-changed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -60,6 +68,8 @@ jobs:
- run: make deps-backend deps-tools
- run: make --always-make checks-backend # ensure the "go-licenses" make target runs
frontend:
if: needs.files-changed.outputs.frontend == 'true'
needs: files-changed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -70,6 +80,8 @@ jobs:
- run: make lint-frontend
- run: make checks-frontend
backend:
if: needs.files-changed.outputs.backend == 'true'
needs: files-changed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/pull-db-tests-docsignore.yml

This file was deleted.

18 changes: 15 additions & 3 deletions .github/workflows/pull-db-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ name: db-tests

on:
pull_request:
paths-ignore:
- "docs/**"
- "*.md"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
files-changed:
uses: ./.github/workflows/files-changed.yml

test-pgsql:
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.frontend == 'true'
needs: files-changed
runs-on: ubuntu-latest
services:
pgsql:
Expand Down Expand Up @@ -56,6 +58,8 @@ jobs:
USE_REPO_TEST_DIR: 1

test-sqlite:
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.frontend == 'true'
needs: files-changed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -75,6 +79,8 @@ jobs:
USE_REPO_TEST_DIR: 1

test-unit:
if: needs.files-changed.outputs.backend == 'true'
needs: files-changed
runs-on: ubuntu-latest
services:
mysql:
Expand Down Expand Up @@ -138,6 +144,8 @@ jobs:
GITHUB_READ_TOKEN: ${{ secrets.GITHUB_READ_TOKEN }}

test-mysql5:
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.frontend == 'true'
needs: files-changed
runs-on: ubuntu-latest
services:
mysql:
Expand Down Expand Up @@ -180,6 +188,8 @@ jobs:
TEST_INDEXER_CODE_ES_URL: "http://elastic:changeme@elasticsearch:9200"

test-mysql8:
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.frontend == 'true'
needs: files-changed
runs-on: ubuntu-latest
services:
mysql8:
Expand Down Expand Up @@ -207,6 +217,8 @@ jobs:
USE_REPO_TEST_DIR: 1

test-mssql:
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.frontend == 'true'
needs: files-changed
runs-on: ubuntu-latest
services:
mssql:
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/pull-docker-dryrun-docsignore.yml

This file was deleted.

8 changes: 5 additions & 3 deletions .github/workflows/pull-docker-dryrun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ name: docker-dryrun

on:
pull_request:
paths-ignore:
- "docs/**"
- "*.md"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
files-changed:
uses: ./.github/workflows/files-changed.yml

docker-dryrun:
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.frontend == 'true'
needs: files-changed
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@v2
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/pull-e2e-tests-docsignore.yml

This file was deleted.

8 changes: 5 additions & 3 deletions .github/workflows/pull-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ name: e2e-tests

on:
pull_request:
paths-ignore:
- "docs/**"
- "*.md"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
files-changed:
uses: ./.github/workflows/files-changed.yml

test-e2e:
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.frontend == 'true'
needs: files-changed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ Dong Ge <gedong_1994@163.com> (@sillyguodong)
Xinyi Gong <hestergong@gmail.com> (@HesterG)
wxiaoguang <wxiaoguang@gmail.com> (@wxiaoguang)
Gary Moon <gary@garymoon.net> (@garymoon)
Philip Peterson <philip.c.peterson@gmail.com> (@philip-peterson)
Loading

0 comments on commit 0f56349

Please sign in to comment.