-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 36e1c43
Showing
20 changed files
with
1,235 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.editorconfig | ||
logs | ||
start | ||
config.yaml | ||
registration.yaml | ||
*.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = tab | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yaml,yml,sql}] | ||
indent_style = space | ||
|
||
[{.gitlab-ci.yml,.github/workflows/*.yml}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
name: Bug report | ||
about: If something is definitely wrong in the bridge (rather than just a setup issue), | ||
file a bug report. Remember to include relevant logs. | ||
labels: bug | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
contact_links: | ||
- name: Troubleshooting docs & FAQ | ||
url: https://docs.mau.fi/bridges/general/troubleshooting.html | ||
about: Check this first if you're having problems setting up the bridge. | ||
- name: Support room | ||
url: https://matrix.to/#/#meta:maunium.net | ||
about: For setup issues not answered by the troubleshooting docs, ask in the Matrix room. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
name: Enhancement request | ||
about: Submit a feature request or other suggestion | ||
labels: enhancement | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Go | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
go-version: ["1.20", "1.21"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
cache: true | ||
|
||
- name: Install libolm | ||
run: sudo apt-get install libolm-dev libolm3 | ||
|
||
- name: Install goimports | ||
run: | | ||
go install golang.org/x/tools/cmd/goimports@latest | ||
export PATH="$HOME/go/bin:$PATH" | ||
- name: Install pre-commit | ||
run: pip install pre-commit | ||
|
||
- name: Lint | ||
run: pre-commit run -a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.idea | ||
|
||
*.yaml | ||
!.pre-commit-config.yaml | ||
!example-config.yaml | ||
|
||
*.json | ||
*.db | ||
*.log | ||
*.bak | ||
|
||
/mautrix-meta | ||
/start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
include: | ||
- project: 'mautrix/ci' | ||
file: '/go.yml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
exclude_types: [markdown] | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
|
||
- repo: https://github.com/tekwizely/pre-commit-golang | ||
rev: v1.0.0-rc.1 | ||
hooks: | ||
- id: go-imports | ||
exclude: "pb\\.go$" | ||
- id: go-vet-mod | ||
#- id: go-staticcheck-repo-mod | ||
# TODO: reenable this and fix all the problems | ||
|
||
- repo: https://github.com/beeper/pre-commit-go | ||
rev: v0.3.0 | ||
hooks: | ||
- id: zerolog-ban-msgf | ||
- id: zerolog-use-stringer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM golang:1-alpine3.19 AS builder | ||
|
||
RUN apk add --no-cache git ca-certificates build-base su-exec olm-dev | ||
|
||
COPY . /build | ||
WORKDIR /build | ||
RUN go build -o /usr/bin/mautrix-meta | ||
|
||
FROM alpine:3.19 | ||
|
||
ENV UID=1337 \ | ||
GID=1337 | ||
|
||
RUN apk add --no-cache ffmpeg su-exec ca-certificates olm bash jq yq curl | ||
|
||
COPY --from=builder /usr/bin/mautrix-meta /usr/bin/mautrix-meta | ||
COPY --from=builder /build/example-config.yaml /opt/mautrix-meta/example-config.yaml | ||
COPY --from=builder /build/docker-run.sh /docker-run.sh | ||
VOLUME /data | ||
|
||
CMD ["/docker-run.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM alpine:3.19 | ||
|
||
ENV UID=1337 \ | ||
GID=1337 | ||
|
||
RUN apk add --no-cache ffmpeg su-exec ca-certificates bash jq curl yq | ||
|
||
ARG EXECUTABLE=./mautrix-meta | ||
COPY $EXECUTABLE /usr/bin/mautrix-meta | ||
COPY ./example-config.yaml /opt/mautrix-meta/example-config.yaml | ||
COPY ./docker-run.sh /docker-run.sh | ||
VOLUME /data | ||
|
||
CMD ["/docker-run.sh"] |
Oops, something went wrong.