Skip to content

Commit 9b5b943

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: Show if File is Executable (go-gitea#25287) Add devcontainer config for developing Gitea (go-gitea#24781) Add link to support page for commercial support (go-gitea#25293) Docs about how to generate config for act runner with docker and setup it with docker-compose (go-gitea#25256) Fix some UI alignments (go-gitea#25277) Remove fomantic inverted variations (go-gitea#25286) Fix issue and commit status popup padding (go-gitea#25254)
2 parents de2c98c + a305c37 commit 9b5b943

File tree

16 files changed

+275
-4475
lines changed

16 files changed

+275
-4475
lines changed

.devcontainer/devcontainer.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "Gitea DevContainer",
3+
"image": "mcr.microsoft.com/devcontainers/go:1.20",
4+
"features": {
5+
// installs nodejs into container
6+
"ghcr.io/devcontainers/features/node:1": {
7+
"version":"20"
8+
}
9+
},
10+
"customizations": {
11+
"vscode": {
12+
"settings": {},
13+
// same extensions as Gitpod, should match /.gitpod.yml
14+
"extensions": [
15+
"editorconfig.editorconfig",
16+
"dbaeumer.vscode-eslint",
17+
"golang.go",
18+
"stylelint.vscode-stylelint",
19+
"DavidAnson.vscode-markdownlint",
20+
"Vue.volar",
21+
"ms-azuretools.vscode-docker",
22+
"zixuanchen.vitest-explorer",
23+
"alexcvzz.vscode-sqlite"
24+
]
25+
}
26+
},
27+
"portsAttributes": {
28+
"3000": {
29+
"label": "Gitea Web",
30+
"onAutoForward": "notify"
31+
}
32+
},
33+
"postCreateCommand": "make deps"
34+
}

docs/content/doc/help/support.en-us.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ menu:
1717

1818
# Support Options
1919

20+
- [Paid Commercial Support](https://about.gitea.com/)
2021
- [Discord](https://discord.gg/Gitea)
2122
- [Discourse Forum](https://discourse.gitea.io/)
2223

docs/content/doc/usage/actions/act-runner.en-us.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ The default configuration is safe to use without any modification, so you can ju
7676
./act_runner --config config.yaml [command]
7777
```
7878

79+
You could also generate config file with docker:
80+
81+
```bash
82+
docker run --entrypoint="" --rm -it gitea/act_runner:latest act_runner generate-config > config.yaml
83+
```
84+
7985
When you are using the docker image, you can specify the configuration file by using the `CONFIG_FILE` environment variable. Make sure that the file is mounted into the container as a volume:
8086

8187
```bash
@@ -172,6 +178,27 @@ It is because the act runner will run jobs in docker containers, so it needs to
172178
As mentioned, you can remove it if you want to run jobs in the host directly.
173179
To be clear, the "host" actually means the container which is running the act runner now, instead of the host machine.
174180

181+
### Set up the runner using docker compose
182+
183+
You could also set up the runner using the following `docker-compose.yml`:
184+
185+
```yml
186+
version: "3.8"
187+
services:
188+
runner:
189+
image: gitea/act_runner:nightly
190+
environment:
191+
CONFIG_FILE: /config.yaml
192+
GITEA_INSTANCE_URL: "${INSTANCE_URL}"
193+
GITEA_RUNNER_REGISTRATION_TOKEN: "${REGISTRATION_TOKEN}"
194+
GITEA_RUNNER_NAME: "${RUNNER_NAME}"
195+
GITEA_RUNNER_LABELS: "${RUNNER_LABELS}"
196+
volumes:
197+
- ./config.yaml:/config.yaml
198+
- ./data:/data
199+
- /var/run/docker.sock:/var/run/docker.sock
200+
```
201+
175202
### Configuring cache when starting a Runner using docker image
176203
177204
If you do not intend to use `actions/cache` in workflow, you can ignore this section.

docs/content/doc/usage/actions/act-runner.zh-cn.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ docker pull gitea/act_runner:nightly # for the latest nightly build
7676
./act_runner --config config.yaml [command]
7777
```
7878

79+
您亦可以如下使用 docker 创建配置文件:
80+
81+
```bash
82+
docker run --entrypoint="" --rm -it gitea/act_runner:latest act_runner generate-config > config.yaml
83+
```
84+
7985
当使用Docker镜像时,可以使用`CONFIG_FILE`环境变量指定配置文件。确保将文件作为卷挂载到容器中:
8086

8187
```bash
@@ -169,6 +175,27 @@ docker run \
169175
如前所述,如果要在主机上直接运行Job,可以将其移除。
170176
需要明确的是,这里的 "主机" 实际上指的是当前运行 Act Runner的容器,而不是主机机器本身。
171177

178+
### 使用 Docker compose 运行 Runner
179+
180+
您亦可使用如下的 `docker-compose.yml`:
181+
182+
```yml
183+
version: "3.8"
184+
services:
185+
runner:
186+
image: gitea/act_runner:nightly
187+
environment:
188+
CONFIG_FILE: /config.yaml
189+
GITEA_INSTANCE_URL: "${INSTANCE_URL}"
190+
GITEA_RUNNER_REGISTRATION_TOKEN: "${REGISTRATION_TOKEN}"
191+
GITEA_RUNNER_NAME: "${RUNNER_NAME}"
192+
GITEA_RUNNER_LABELS: "${RUNNER_LABELS}"
193+
volumes:
194+
- ./config.yaml:/config.yaml
195+
- ./data:/data
196+
- /var/run/docker.sock:/var/run/docker.sock
197+
```
198+
172199
### 当您使用 Docker 镜像启动 Runner,如何配置 Cache
173200
174201
如果你不打算在工作流中使用 `actions/cache`,你可以忽略本段。

options/locale/locale_en-US.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,6 +1156,7 @@ video_not_supported_in_browser = Your browser does not support the HTML5 'video'
11561156
audio_not_supported_in_browser = Your browser does not support the HTML5 'audio' tag.
11571157
stored_lfs = Stored with Git LFS
11581158
symbolic_link = Symbolic link
1159+
executable_file = Executable File
11591160
commit_graph = Commit Graph
11601161
commit_graph.select = Select branches
11611162
commit_graph.hide_pr_refs = Hide Pull Requests

routers/web/repo/view.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
390390
ctx.Data["IsRepresentableAsText"] = isRepresentableAsText
391391
ctx.Data["IsDisplayingSource"] = isDisplayingSource
392392
ctx.Data["IsDisplayingRendered"] = isDisplayingRendered
393+
ctx.Data["IsExecutable"] = entry.IsExecutable()
393394

394395
isTextSource := fInfo.isTextFile || isDisplayingSource
395396
ctx.Data["IsTextSource"] = isTextSource

templates/repo/commits.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{{template "repo/header" .}}
44
<div class="ui container">
55
{{template "repo/sub_menu" .}}
6-
<div class="repo-button-row gt-df gt-ac gt-sb gt-fw gt-mb-4 gt-mt-3">
6+
<div class="repo-button-row">
77
<div class="gt-df gt-ac">
88
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}}
99
<a href="{{.RepoLink}}/graph" class="ui basic small compact button">

templates/repo/file_info.tmpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,9 @@
2525
{{.LexerName}}
2626
</div>
2727
{{end}}
28+
{{if .IsExecutable}}
29+
<div class="file-info-entry">
30+
{{.locale.Tr "repo.executable_file"}}
31+
</div>
32+
{{end}}
2833
</div>

templates/repo/home.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
</div>
6262
{{end}}
6363
{{template "repo/sub_menu" .}}
64-
<div class="repo-button-row gt-df gt-ac gt-sb gt-fw">
64+
<div class="repo-button-row">
6565
<div class="gt-df gt-ac gt-fw gt-gap-y-3">
6666
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}}
6767
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
@@ -84,8 +84,9 @@
8484
{{end}}
8585

8686
{{if and .CanWriteCode .IsViewBranch (not .Repository.IsArchived)}}
87-
<button class="ui basic compact dropdown jump icon button gt-mr-2"{{if not .Repository.CanEnableEditor}} disabled{{end}}>
88-
<span class="text">{{.locale.Tr "repo.editor.add_file"}}</span>
87+
<button class="ui dropdown basic compact jump button gt-mr-2"{{if not .Repository.CanEnableEditor}} disabled{{end}}>
88+
{{.locale.Tr "repo.editor.add_file"}}
89+
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
8990
<div class="menu">
9091
<a class="item" href="{{.RepoLink}}/_new/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
9192
{{.locale.Tr "repo.editor.new_file"}}
@@ -99,7 +100,6 @@
99100
{{.locale.Tr "repo.editor.patch"}}
100101
</a>
101102
</div>
102-
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
103103
</button>
104104
{{end}}
105105

templates/repo/wiki/view.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{{template "repo/header" .}}
44
{{$title := .title}}
55
<div class="ui container">
6-
<div class="repo-button-row gt-df gt-ac gt-sb gt-fw">
6+
<div class="repo-button-row">
77
<div class="gt-df gt-ac">
88
<div class="ui floating filter dropdown" data-no-results="{{.locale.Tr "repo.pulls.no_results"}}">
99
<div class="ui basic small button">

web_src/css/base.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2099,8 +2099,8 @@ a.ui.basic.label:hover {
20992099
}
21002100

21012101
/* if a .top.attached.header is followed by a .segment, add some margin */
2102-
.ui.segments ~ .ui.top.attached.header,
2103-
.ui.attached.segment ~ .ui.top.attached.header {
2102+
.ui.segments + .ui.top.attached.header,
2103+
.ui.attached.segment + .ui.top.attached.header {
21042104
margin-top: 1rem;
21052105
}
21062106

web_src/css/repo.css

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2693,26 +2693,23 @@
26932693
}
26942694

26952695
.repo-button-row {
2696-
margin-bottom: 10px;
2697-
}
2698-
2699-
.repo-button-row > * {
2700-
margin-top: 8px;
2701-
}
2702-
2703-
.wiki .repo-button-row {
2704-
margin-bottom: 0;
2705-
}
2706-
2707-
.wiki .repo-button-row > * {
2708-
margin-top: 0;
2696+
margin: 10px 0;
2697+
display: flex;
2698+
align-items: center;
2699+
gap: 0.5em;
2700+
flex-wrap: wrap;
2701+
justify-content: space-between;
27092702
}
27102703

27112704
.repo-button-row .button {
27122705
padding: 6px 10px !important;
27132706
height: 30px;
27142707
}
27152708

2709+
.repo-button-row .button.dropdown {
2710+
padding-right: 22px !important; /* normal buttons have !important paddings, so we need to override it for dropdown (Add File) icons */
2711+
}
2712+
27162713
.repo-button-row input {
27172714
height: 30px;
27182715
}

web_src/fomantic/_site/globals/site.variables

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,41 @@
99
@linkHoverUnderline: underline;
1010
@variationButtonSocial: false;
1111
@pageOverflowX: visible;
12+
13+
/* disable all inverted variations */
14+
@variationAccordionInverted: false;
15+
@variationBreadcrumbInverted: false;
16+
@variationButtonAttached: false;
17+
@variationButtonInverted: false;
18+
@variationCalendarInverted: false;
19+
@variationCardInverted: false;
20+
@variationCheckboxInverted: false;
21+
@variationCommentInverted: false;
22+
@variationDimmerInverted: false;
23+
@variationDividerInverted: false;
24+
@variationDropdownInverted: false;
25+
@variationFeedInverted: false;
26+
@variationFlyoutInverted: false;
27+
@variationFormInverted: false;
28+
@variationGridInverted: false;
29+
@variationHeaderInverted: false;
30+
@variationIconInverted: false;
31+
@variationInputInverted: false;
32+
@variationItemInverted: false;
33+
@variationLabelInverted: false;
34+
@variationListInverted: false;
35+
@variationMenuInverted: false;
36+
@variationMessageInverted: false;
37+
@variationModalInverted: false;
38+
@variationNagInverted: false;
39+
@variationPlaceholderInverted: false;
40+
@variationPopupInverted: false;
41+
@variationProgressInverted: false;
42+
@variationSegmentInverted: false;
43+
@variationSliderInverted: false;
44+
@variationStatisticInverted: false;
45+
@variationStepInverted: false;
46+
@variationTableInverted: false;
47+
@variationTextInverted: false;
48+
@variationToastInverted: false;
49+
@variationTransitionInverted: false;

0 commit comments

Comments
 (0)