diff --git a/docker/gitea/Dockerfile b/docker/gitea/Dockerfile index f0d69da5e3..03ed9fc098 100644 --- a/docker/gitea/Dockerfile +++ b/docker/gitea/Dockerfile @@ -25,14 +25,14 @@ ################################### # Build stage -FROM docker.io/library/golang:1.21-bookworm AS build-env +FROM docker.io/library/golang:1.22-bookworm AS build-env LABEL maintainer="infra-root@openstack.org" ARG GOPROXY ENV GOPROXY ${GOPROXY:-direct} -ARG GITEA_VERSION="v1.21.11" +ARG GITEA_VERSION="v1.22.1" ENV TAGS "bindata timetzdata $TAGS" # Build deps diff --git a/docker/gitea/custom/templates/base/head_navbar.tmpl b/docker/gitea/custom/templates/base/head_navbar.tmpl index c7cef0d6c6..5162356e5f 100644 --- a/docker/gitea/custom/templates/base/head_navbar.tmpl +++ b/docker/gitea/custom/templates/base/head_navbar.tmpl @@ -4,23 +4,31 @@ {{end}} diff --git a/docker/gitea/custom/templates/repo/header.tmpl b/docker/gitea/custom/templates/repo/header.tmpl index d69947241a..453ae4ab3a 100644 --- a/docker/gitea/custom/templates/repo/header.tmpl +++ b/docker/gitea/custom/templates/repo/header.tmpl @@ -1,39 +1,38 @@ -
+
{{with .Repository}}
-
-
-
- {{template "repo/icon" .}} +
+
+ {{template "repo/icon" .}} +
+
+ - {{.Owner.Name}} -
/
- {{.Name}} -
- {{if .IsArchived}} - {{ctx.Locale.Tr "repo.desc.archived"}} +
+
+ {{if .IsArchived}} + {{ctx.Locale.Tr "repo.desc.archived"}} +
{{svg "octicon-archive" 18}}
+ {{end}} + {{if .IsPrivate}} + {{ctx.Locale.Tr "repo.desc.private"}} +
{{svg "octicon-lock" 18}}
+ {{else}} + {{if .Owner.Visibility.IsPrivate}} + {{ctx.Locale.Tr "repo.desc.internal"}} +
{{svg "octicon-shield-lock" 18}}
{{end}} - {{if .IsPrivate}} - {{ctx.Locale.Tr "repo.desc.private"}} - {{else}} - {{if .Owner.Visibility.IsPrivate}} - {{ctx.Locale.Tr "repo.desc.internal"}} - {{end}} - {{end}} - {{if .IsTemplate}} - {{ctx.Locale.Tr "repo.desc.template"}} - {{end}} -
- {{if $.EnableFeed}} - {{svg "octicon-rss" 18}} + {{end}} + {{if .IsTemplate}} + {{ctx.Locale.Tr "repo.desc.template"}} +
{{svg "octicon-repo-template" 18}}
+ {{end}} + {{if eq .ObjectFormatName "sha256"}} + {{ctx.Locale.Tr "repo.desc.sha256"}} {{end}}
- {{if $.PullMirror}} -
{{ctx.Locale.Tr "repo.mirror_from"}} {{$.PullMirror.RemoteAddress}}
- {{end}} - {{if .IsFork}}
{{ctx.Locale.Tr "repo.forked_from"}} {{.BaseRepo.FullName}}
{{end}} - {{if .IsGenerated}}
{{ctx.Locale.Tr "repo.generated_from"}} {{.TemplateRepo.FullName}}
{{end}}
-
-
-{{end}} -
- {{if not (or .Repository.IsBeingCreated .Repository.IsBroken)}} - - {{else if .Permission.IsAdmin}} - + {{if $.PullMirror}} +
+ {{ctx.Locale.Tr "repo.mirror_from"}} + {{$.PullMirror.RemoteAddress}} + {{if $.PullMirror.UpdatedUnix}}{{ctx.Locale.Tr "repo.mirror_sync"}} {{TimeSinceUnix $.PullMirror.UpdatedUnix ctx.Locale}}{{end}}
{{end}} + {{if .IsFork}}
{{ctx.Locale.Tr "repo.forked_from"}} {{.BaseRepo.FullName}}
{{end}} + {{if .IsGenerated}}
{{ctx.Locale.Tr "repo.generated_from"}} {{(.TemplateRepo ctx).FullName}}
{{end}} +
+{{end}} +
+ + {{if not (or .Repository.IsBeingCreated .Repository.IsBroken)}} +
+ {{if .Permission.CanRead ctx.Consts.RepoUnitTypeCode}} + + {{svg "octicon-code"}} {{ctx.Locale.Tr "repo.code"}} + + {{end}} + + {{if .Permission.CanRead ctx.Consts.RepoUnitTypeIssues}} + + {{svg "octicon-issue-opened"}} {{ctx.Locale.Tr "repo.issues"}} + {{if .Repository.NumOpenIssues}} + {{CountFmt .Repository.NumOpenIssues}} + {{end}} + + {{end}} + + {{if .Permission.CanRead ctx.Consts.RepoUnitTypeExternalTracker}} + + {{svg "octicon-link-external"}} {{ctx.Locale.Tr "repo.issues"}} + + {{end}} + + {{if and .Repository.CanEnablePulls (.Permission.CanRead ctx.Consts.RepoUnitTypePullRequests)}} + + {{svg "octicon-git-pull-request"}} {{ctx.Locale.Tr "repo.pulls"}} + {{if .Repository.NumOpenPulls}} + {{CountFmt .Repository.NumOpenPulls}} + {{end}} + + {{end}} + + {{if and .EnableActions (not .UnitActionsGlobalDisabled) (.Permission.CanRead ctx.Consts.RepoUnitTypeActions)}} + + {{svg "octicon-play"}} {{ctx.Locale.Tr "actions.actions"}} + {{if .Repository.NumOpenActionRuns}} + {{CountFmt .Repository.NumOpenActionRuns}} + {{end}} + + {{end}} + + + + {{svg "octicon-git-pull-request"}} Proposed changes + + + {{if .Permission.CanRead ctx.Consts.RepoUnitTypePackages}} + + {{svg "octicon-package"}} {{ctx.Locale.Tr "packages.title"}} + + {{end}} + + {{$projectsUnit := .Repository.MustGetUnit $.Context ctx.Consts.RepoUnitTypeProjects}} + {{if and (not .UnitProjectsGlobalDisabled) (.Permission.CanRead ctx.Consts.RepoUnitTypeProjects) ($projectsUnit.ProjectsConfig.IsProjectsAllowed "repo")}} + + {{svg "octicon-project"}} {{ctx.Locale.Tr "repo.project_board"}} + {{if .Repository.NumOpenProjects}} + {{CountFmt .Repository.NumOpenProjects}} + {{end}} + + {{end}} + + + + {{if .Permission.CanRead ctx.Consts.RepoUnitTypeWiki}} + + {{svg "octicon-book"}} {{ctx.Locale.Tr "repo.wiki"}} + + {{end}} + + {{if .Permission.CanRead ctx.Consts.RepoUnitTypeExternalWiki}} + + {{svg "octicon-link-external"}} {{ctx.Locale.Tr "repo.wiki"}} + + {{end}} + + + + {{template "custom/extra_tabs" .}} + + {{if .Permission.IsAdmin}} + + + {{svg "octicon-tools"}} {{ctx.Locale.Tr "repo.settings"}} + + {{end}} +
+ {{else if .Permission.IsAdmin}} + + {{end}} +
diff --git a/playbooks/roles/gitea/templates/app.ini.j2 b/playbooks/roles/gitea/templates/app.ini.j2 index ab69ebad52..213641ae2c 100644 --- a/playbooks/roles/gitea/templates/app.ini.j2 +++ b/playbooks/roles/gitea/templates/app.ini.j2 @@ -97,7 +97,7 @@ NO_REPLY_ADDRESS = noreply.example.org ENABLED = false [oauth2] -ENABLE = false +ENABLED = false ; TODO we don't do oauth2 do we need to set this value? JWT_SECRET = {{ gitea_oauth2_jwt_secret }} ; TODO we don't do oauth2 do we need to set this value?