Skip to content

Commit b80e30c

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: [skip ci] Updated translations via Crowdin Keep filter when showing unfiltered results on explore page (go-gitea#27192) Don't show Link to TOTP if not set up (go-gitea#27585) Fix data-race bug when accessing task.LastRun (go-gitea#27584) Fix template bug (go-gitea#27581) Replace ajax with fetch, improve image diff (go-gitea#27267) Replace assert.Fail with assert.FailNow (go-gitea#27578) Fix the robots.txt path show manual cron run's last time (go-gitea#27544) fully replace drone with actions (go-gitea#27556) Revert "Simplify `contrib/backport` (go-gitea#27520)" (go-gitea#27566) Align ISSUE_TEMPLATE with the new label system (go-gitea#27573) Penultimate round of `db.DefaultContext` refactor (go-gitea#27414)
2 parents 80cade2 + d020343 commit b80e30c

File tree

178 files changed

+1171
-992
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+1171
-992
lines changed

.drone.yml

Lines changed: 0 additions & 428 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug-report.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Bug Report
22
description: Found something you weren't expecting? Report it here!
3-
labels: ["kind/bug"]
3+
labels: ["type/bug"]
44
body:
55
- type: markdown
66
attributes:

.github/ISSUE_TEMPLATE/feature-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Feature Request
22
description: Got an idea for a feature that Gitea doesn't have currently? Submit your idea here!
3-
labels: ["kind/proposal"]
3+
labels: ["type/proposal"]
44
body:
55
- type: markdown
66
attributes:

.github/ISSUE_TEMPLATE/ui.bug-report.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Web Interface Bug Report
22
description: Something doesn't look quite as it should? Report it here!
3-
labels: ["kind/bug", "kind/ui"]
3+
labels: ["type/bug", "topic/ui"]
44
body:
55
- type: markdown
66
attributes:

.github/workflows/release-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: release-nightly-assets
1+
name: release-nightly
22

33
on:
44
push:

.github/workflows/release-tag-rc.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
name: release-tag-rc
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v1*-rc*'
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: false
11+
12+
jobs:
13+
binary:
14+
runs-on: nscloud
15+
steps:
16+
- uses: actions/checkout@v4
17+
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
18+
# fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567
19+
- run: git fetch --unshallow --quiet --tags --force
20+
- uses: actions/setup-go@v4
21+
with:
22+
go-version: "~1.21"
23+
check-latest: true
24+
- uses: actions/setup-node@v3
25+
with:
26+
node-version: 20
27+
- run: make deps-frontend deps-backend
28+
# xgo build
29+
- run: make release
30+
env:
31+
TAGS: bindata sqlite sqlite_unlock_notify
32+
- name: import gpg key
33+
id: import_gpg
34+
uses: crazy-max/ghaction-import-gpg@v5
35+
with:
36+
gpg_private_key: ${{ secrets.GPGSIGN_KEY }}
37+
passphrase: ${{ secrets.GPGSIGN_PASSPHRASE }}
38+
- name: sign binaries
39+
run: |
40+
for f in dist/release/*; do
41+
echo '${{ secrets.GPGSIGN_PASSPHRASE }}' | gpg --pinentry-mode loopback --passphrase-fd 0 --batch --yes --detach-sign -u ${{ steps.import_gpg.outputs.fingerprint }} --output "$f.asc" "$f"
42+
done
43+
# clean branch name to get the folder name in S3
44+
- name: Get cleaned branch name
45+
id: clean_name
46+
run: |
47+
REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//')
48+
echo "Cleaned name is ${REF_NAME}"
49+
echo "branch=${REF_NAME}" >> "$GITHUB_OUTPUT"
50+
- name: configure aws
51+
uses: aws-actions/configure-aws-credentials@v4
52+
with:
53+
aws-region: ${{ secrets.AWS_REGION }}
54+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
55+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
56+
- name: upload binaries to s3
57+
run: |
58+
aws s3 sync dist/release s3://${{ secrets.AWS_S3_BUCKET }}/gitea/${{ steps.clean_name.outputs.branch }} --no-progress
59+
- name: create github release
60+
run: |
61+
gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --draft --notes-from-tag dist/release/*
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
64+
docker-rootful:
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: actions/checkout@v4
68+
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
69+
# fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567
70+
- run: git fetch --unshallow --quiet --tags --force
71+
- uses: docker/setup-qemu-action@v2
72+
- uses: docker/setup-buildx-action@v2
73+
- uses: docker/metadata-action@v5
74+
id: meta
75+
with:
76+
images: gitea/gitea
77+
# 1.2.3-rc0
78+
tags: |
79+
type=semver,pattern={{version}}
80+
- name: Login to Docker Hub
81+
uses: docker/login-action@v2
82+
with:
83+
username: ${{ secrets.DOCKERHUB_USERNAME }}
84+
password: ${{ secrets.DOCKERHUB_TOKEN }}
85+
- name: build rootful docker image
86+
uses: docker/build-push-action@v4
87+
with:
88+
context: .
89+
platforms: linux/amd64,linux/arm64
90+
push: true
91+
tags: ${{ steps.meta.outputs.tags }}
92+
labels: ${{ steps.meta.outputs.labels }}
93+
docker-rootless:
94+
runs-on: ubuntu-latest
95+
steps:
96+
- uses: actions/checkout@v4
97+
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
98+
# fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567
99+
- run: git fetch --unshallow --quiet --tags --force
100+
- uses: docker/setup-qemu-action@v2
101+
- uses: docker/setup-buildx-action@v2
102+
- uses: docker/metadata-action@v5
103+
id: meta
104+
with:
105+
images: gitea/gitea
106+
# each tag below will have the suffix of -rootless
107+
flavor: |
108+
suffix=-rootless
109+
# 1.2.3-rc0
110+
tags: |
111+
type=semver,pattern={{version}}
112+
- name: Login to Docker Hub
113+
uses: docker/login-action@v2
114+
with:
115+
username: ${{ secrets.DOCKERHUB_USERNAME }}
116+
password: ${{ secrets.DOCKERHUB_TOKEN }}
117+
- name: build rootless docker image
118+
uses: docker/build-push-action@v4
119+
with:
120+
context: .
121+
platforms: linux/amd64,linux/arm64
122+
push: true
123+
file: Dockerfile.rootless
124+
tags: ${{ steps.meta.outputs.tags }}
125+
labels: ${{ steps.meta.outputs.labels }}
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
name: release-tag-version
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v1.*'
7+
- '!v1*-rc*'
8+
- '!v1*-dev'
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: false
13+
14+
jobs:
15+
binary:
16+
runs-on: nscloud
17+
steps:
18+
- uses: actions/checkout@v4
19+
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
20+
# fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567
21+
- run: git fetch --unshallow --quiet --tags --force
22+
- uses: actions/setup-go@v4
23+
with:
24+
go-version: "~1.21"
25+
check-latest: true
26+
- uses: actions/setup-node@v3
27+
with:
28+
node-version: 20
29+
- run: make deps-frontend deps-backend
30+
# xgo build
31+
- run: make release
32+
env:
33+
TAGS: bindata sqlite sqlite_unlock_notify
34+
- name: import gpg key
35+
id: import_gpg
36+
uses: crazy-max/ghaction-import-gpg@v5
37+
with:
38+
gpg_private_key: ${{ secrets.GPGSIGN_KEY }}
39+
passphrase: ${{ secrets.GPGSIGN_PASSPHRASE }}
40+
- name: sign binaries
41+
run: |
42+
for f in dist/release/*; do
43+
echo '${{ secrets.GPGSIGN_PASSPHRASE }}' | gpg --pinentry-mode loopback --passphrase-fd 0 --batch --yes --detach-sign -u ${{ steps.import_gpg.outputs.fingerprint }} --output "$f.asc" "$f"
44+
done
45+
# clean branch name to get the folder name in S3
46+
- name: Get cleaned branch name
47+
id: clean_name
48+
run: |
49+
REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//')
50+
echo "Cleaned name is ${REF_NAME}"
51+
echo "branch=${REF_NAME}" >> "$GITHUB_OUTPUT"
52+
- name: configure aws
53+
uses: aws-actions/configure-aws-credentials@v4
54+
with:
55+
aws-region: ${{ secrets.AWS_REGION }}
56+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
57+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
58+
- name: upload binaries to s3
59+
run: |
60+
aws s3 sync dist/release s3://${{ secrets.AWS_S3_BUCKET }}/gitea/${{ steps.clean_name.outputs.branch }} --no-progress
61+
- name: create github release
62+
run: |
63+
gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --draft --notes-from-tag dist/release/*
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
66+
docker-rootful:
67+
runs-on: ubuntu-latest
68+
steps:
69+
- uses: actions/checkout@v4
70+
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
71+
# fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567
72+
- run: git fetch --unshallow --quiet --tags --force
73+
- uses: docker/setup-qemu-action@v2
74+
- uses: docker/setup-buildx-action@v2
75+
- uses: docker/metadata-action@v5
76+
id: meta
77+
with:
78+
images: gitea/gitea
79+
# this will generate tags in the following format:
80+
# latest
81+
# 1
82+
# 1.2
83+
# 1.2.3
84+
tags: |
85+
type=raw,value=latest
86+
type=semver,pattern={{major}}
87+
type=semver,pattern={{major}}.{{minor}}
88+
type=semver,pattern={{version}}
89+
- name: Login to Docker Hub
90+
uses: docker/login-action@v2
91+
with:
92+
username: ${{ secrets.DOCKERHUB_USERNAME }}
93+
password: ${{ secrets.DOCKERHUB_TOKEN }}
94+
- name: build rootful docker image
95+
uses: docker/build-push-action@v4
96+
with:
97+
context: .
98+
platforms: linux/amd64,linux/arm64
99+
push: true
100+
tags: ${{ steps.meta.outputs.tags }}
101+
labels: ${{ steps.meta.outputs.labels }}
102+
docker-rootless:
103+
runs-on: ubuntu-latest
104+
steps:
105+
- uses: actions/checkout@v4
106+
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
107+
# fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567
108+
- run: git fetch --unshallow --quiet --tags --force
109+
- uses: docker/setup-qemu-action@v2
110+
- uses: docker/setup-buildx-action@v2
111+
- uses: docker/metadata-action@v5
112+
id: meta
113+
with:
114+
images: gitea/gitea
115+
# each tag below will have the suffix of -rootless
116+
flavor: |
117+
suffix=-rootless
118+
# this will generate tags in the following format (with -rootless suffix added):
119+
# latest
120+
# 1
121+
# 1.2
122+
# 1.2.3
123+
tags: |
124+
type=raw,value=latest
125+
type=semver,pattern={{major}}
126+
type=semver,pattern={{major}}.{{minor}}
127+
type=semver,pattern={{version}}
128+
- name: Login to Docker Hub
129+
uses: docker/login-action@v2
130+
with:
131+
username: ${{ secrets.DOCKERHUB_USERNAME }}
132+
password: ${{ secrets.DOCKERHUB_TOKEN }}
133+
- name: build rootless docker image
134+
uses: docker/build-push-action@v4
135+
with:
136+
context: .
137+
platforms: linux/amd64,linux/arm64
138+
push: true
139+
file: Dockerfile.rootless
140+
tags: ${{ steps.meta.outputs.tags }}
141+
labels: ${{ steps.meta.outputs.labels }}

.yamllint.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ rules:
2424
document-start:
2525
level: error
2626
present: false
27-
ignore: |
28-
/.drone.yml
2927

3028
document-end:
3129
present: false

cmd/admin_auth.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func runListAuth(c *cli.Context) error {
6262
return err
6363
}
6464

65-
authSources, err := auth_model.Sources()
65+
authSources, err := auth_model.Sources(ctx)
6666
if err != nil {
6767
return err
6868
}
@@ -100,7 +100,7 @@ func runDeleteAuth(c *cli.Context) error {
100100
return err
101101
}
102102

103-
source, err := auth_model.GetSourceByID(c.Int64("id"))
103+
source, err := auth_model.GetSourceByID(ctx, c.Int64("id"))
104104
if err != nil {
105105
return err
106106
}

0 commit comments

Comments
 (0)