Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
97206d45f8 | |||
f33e256ddc | |||
8d7974d773 | |||
fb931dfcee | |||
07b45c8d32 | |||
4bd4ee2288 | |||
48923386b3 |
19
.gitea/PULL_REQUEST_TEMPLATE.md
Normal file
19
.gitea/PULL_REQUEST_TEMPLATE.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#### :book: Summary
|
||||||
|
|
||||||
|
<!-- Provide a summary of your changes. Describe the why and not how. -->
|
||||||
|
|
||||||
|
#### :bookmark_tabs: Test Plan
|
||||||
|
|
||||||
|
> :bulb: Select your test plan for the code changes.
|
||||||
|
|
||||||
|
- [x] CI pipeline tests
|
||||||
|
- [ ] Custom test
|
||||||
|
- [ ] No test plan
|
||||||
|
|
||||||
|
##### Details / Justification
|
||||||
|
|
||||||
|
<!-- Add your test details or justification for missing tests here. -->
|
||||||
|
|
||||||
|
#### :books: Additional Notes
|
||||||
|
|
||||||
|
<!-- A place for additional detail notes. -->
|
82
.woodpecker/ci.yml
Normal file
82
.woodpecker/ci.yml
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
when:
|
||||||
|
- event: [pull_request, tag, cron]
|
||||||
|
- event: push
|
||||||
|
branch:
|
||||||
|
- ${CI_REPO_DEFAULT_BRANCH}
|
||||||
|
|
||||||
|
variables:
|
||||||
|
- &build_plugin 'woodpeckerci/plugin-docker-buildx:2.2.0'
|
||||||
|
# deployment targets
|
||||||
|
- &publish_repos 'ocram85/caddy-gitea,gitea.ocram85.com/ocram85/caddy-gitea'
|
||||||
|
# logins for deployment targets
|
||||||
|
- publish_logins: &publish_logins
|
||||||
|
# Default DockerHub login
|
||||||
|
- registry: https://index.docker.io/v1/
|
||||||
|
username:
|
||||||
|
from_secret: docker_user
|
||||||
|
password:
|
||||||
|
from_secret: docker_passwd
|
||||||
|
# Additional Quay.IO login
|
||||||
|
- registry: https://gitea.ocram85.com
|
||||||
|
username:
|
||||||
|
from_secret: gitea_user
|
||||||
|
password:
|
||||||
|
from_secret: gitea_passwd
|
||||||
|
|
||||||
|
steps:
|
||||||
|
test:
|
||||||
|
image: *build_plugin
|
||||||
|
settings:
|
||||||
|
dry_run: true
|
||||||
|
registry: gitea.ocram85.com
|
||||||
|
repo: test
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
platforms: linux/amd64
|
||||||
|
auto_tag: true
|
||||||
|
build_args:
|
||||||
|
- VERSION=${CI_COMMIT_TAG:-PR ${CI_COMMIT_PULL_REQUEST}}
|
||||||
|
- TAG=${CI_COMMIT_TAG}
|
||||||
|
when:
|
||||||
|
event: pull_request
|
||||||
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||||
|
|
||||||
|
publish:
|
||||||
|
image: *build_plugin
|
||||||
|
settings:
|
||||||
|
repo: *publish_repos
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
platforms: linux/amd64
|
||||||
|
auto_tag: true
|
||||||
|
logins: *publish_logins
|
||||||
|
build_args:
|
||||||
|
- VERSION=${CI_COMMIT_TAG:-PR ${CI_COMMIT_PULL_REQUEST}}
|
||||||
|
- TAG=${CI_COMMIT_TAG}
|
||||||
|
when:
|
||||||
|
event: [push, tag, cron]
|
||||||
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||||
|
|
||||||
|
build-next:
|
||||||
|
image: *build_plugin
|
||||||
|
settings:
|
||||||
|
repo: *publish_repos
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
platforms: linux/amd64
|
||||||
|
tag: next
|
||||||
|
logins: *publish_logins
|
||||||
|
build_args:
|
||||||
|
- VERSION=${CI_COMMIT_TAG:-PR ${CI_COMMIT_PULL_REQUEST}}
|
||||||
|
- TAG=${CI_COMMIT_TAG}
|
||||||
|
when:
|
||||||
|
event: [pull_request]
|
||||||
|
|
||||||
|
gitea-release:
|
||||||
|
image: plugins/gitea-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: RENOVATE_TOKEN
|
||||||
|
base_url: https://gitea.ocram85.com
|
||||||
|
title: ${CI_COMMIT_TAG}
|
||||||
|
note: "> :bulb: **Note:** See [CHANGELOG.md](src/branch/main/CHANGELOG.md) for recent changes."
|
||||||
|
when:
|
||||||
|
event: [tag]
|
||||||
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
@ -1,7 +1,7 @@
|
|||||||
FROM caddy:2.6-builder-alpine AS builder
|
FROM caddy:2.6-builder-alpine AS builder
|
||||||
|
|
||||||
RUN xcaddy build \
|
RUN xcaddy build \
|
||||||
--with github.com/42wim/caddy-gitea@v0.0.3
|
--with gitea.ocram85.com/OCram85/caddy-gitea@v0.0.4
|
||||||
|
|
||||||
FROM caddy:2.6.2
|
FROM caddy:2.6.2
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ For now markdown files (with `.md` extension) will also be automatically generat
|
|||||||
### Caddy config
|
### Caddy config
|
||||||
|
|
||||||
The Caddyfile below creates a webserver listening on :3000 which will interact with gitea on <https://yourgitea.yourdomain.com> using `agiteatoken` as the token.
|
The Caddyfile below creates a webserver listening on :3000 which will interact with gitea on <https://yourgitea.yourdomain.com> using `agiteatoken` as the token.
|
||||||
|
The agiteatoken should be a token from gitea that has the necessary read rights on the repo's that you want to expose.
|
||||||
|
|
||||||
```Caddyfile
|
```Caddyfile
|
||||||
{
|
{
|
||||||
|
2
gitea.go
2
gitea.go
@ -5,7 +5,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/42wim/caddy-gitea/pkg/gitea"
|
"gitea.orcram85.com/OCram85/caddy-gitea/pkg/gitea"
|
||||||
"github.com/caddyserver/caddy/v2"
|
"github.com/caddyserver/caddy/v2"
|
||||||
"github.com/caddyserver/caddy/v2/caddyconfig/caddyfile"
|
"github.com/caddyserver/caddy/v2/caddyconfig/caddyfile"
|
||||||
"github.com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile"
|
"github.com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile"
|
||||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
|||||||
module github.com/42wim/caddy-gitea
|
module gitea.ocram85.com/OCram85/caddy-gitea
|
||||||
|
|
||||||
go 1.19
|
go 1.19
|
||||||
|
|
||||||
|
13
renovate.json
Normal file
13
renovate.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"dependencyDashboard": true,
|
||||||
|
"docker": {
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
"woodpecker": {
|
||||||
|
"enabled": true,
|
||||||
|
"fileMatch": [
|
||||||
|
"^.woodpecker\/.*.yml$"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"includeForks": "true"
|
||||||
|
}
|
Reference in New Issue
Block a user