mirror of
https://github.com/thegeeklab/wp-matrix.git
synced 2024-11-22 00:30:41 +00:00
[skip ci] auto-update documentation
This commit is contained in:
parent
68a1d4f068
commit
2c140b5048
69
content/_index.md
Normal file
69
content/_index.md
Normal file
@ -0,0 +1,69 @@
|
||||
---
|
||||
title: wp-matrix
|
||||
---
|
||||
|
||||
[![Build Status](https://ci.thegeeklab.de/api/badges/thegeeklab/wp-matrix/status.svg)](https://ci.thegeeklab.de/repos/thegeeklab/wp-matrix)
|
||||
[![Docker Hub](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/thegeeklab/wp-matrix)
|
||||
[![Quay.io](https://img.shields.io/badge/quay-latest-blue.svg?logo=docker&logoColor=white)](https://quay.io/repository/thegeeklab/wp-matrix)
|
||||
[![Go Report Card](https://goreportcard.com/badge/github.com/thegeeklab/wp-matrix)](https://goreportcard.com/report/github.com/thegeeklab/wp-matrix)
|
||||
[![GitHub contributors](https://img.shields.io/github/contributors/thegeeklab/wp-matrix)](https://github.com/thegeeklab/wp-matrix/graphs/contributors)
|
||||
[![Source: GitHub](https://img.shields.io/badge/source-github-blue.svg?logo=github&logoColor=white)](https://github.com/thegeeklab/wp-matrix)
|
||||
[![License: Apache-2.0](https://img.shields.io/github/license/thegeeklab/wp-matrix)](https://github.com/thegeeklab/wp-matrix/blob/main/LICENSE)
|
||||
|
||||
Woodpecker CI plugin to send messages to a Matrix room.
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
<!-- spellchecker-disable -->
|
||||
{{< toc >}}
|
||||
<!-- spellchecker-enable -->
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
## Usage
|
||||
|
||||
```YAML
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: notify
|
||||
image: thegeeklab/matrix
|
||||
settings:
|
||||
homeserver: https://matrix.org
|
||||
roomid: abcdefghijklmnopqrstuvwxyz:matrix.org
|
||||
username: octocat
|
||||
password: secret
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
<!-- spellchecker-disable -->
|
||||
{{< propertylist name=wp-matrix.data sort=name >}}
|
||||
<!-- spellchecker-enable -->
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
## Build
|
||||
|
||||
Build the binary with the following command:
|
||||
|
||||
```Shell
|
||||
make build
|
||||
```
|
||||
|
||||
Build the container image with the following command:
|
||||
|
||||
```Shell
|
||||
docker build --file Containerfile.multiarch --tag thegeeklab/wp-matrix .
|
||||
```
|
||||
|
||||
## Test
|
||||
|
||||
```Shell
|
||||
docker run --rm \
|
||||
-e PLUGIN_ROOMID=0123456789abcdef:matrix.org \
|
||||
-e PLUGIN_USERNAME=yourbot \
|
||||
-e PLUGIN_PASSWORD=p455w0rd \
|
||||
-v $(pwd):/build:z \
|
||||
-w /build \
|
||||
thegeeklab/wp-matrix
|
||||
```
|
43
data/data.yaml
Normal file
43
data/data.yaml
Normal file
@ -0,0 +1,43 @@
|
||||
---
|
||||
properties:
|
||||
- name: username
|
||||
description: Authentication username. If set, the `password` parameter is required as well.
|
||||
type: string
|
||||
required: false
|
||||
|
||||
- name: password
|
||||
description: Authentication password.
|
||||
type: string
|
||||
required: false
|
||||
|
||||
- name: user_id
|
||||
description: Aauthentication User ID. If set, the `access_token` parameter is required as well.
|
||||
type: string
|
||||
required: false
|
||||
|
||||
- name: access_token
|
||||
description: Authentication access token.
|
||||
type: string
|
||||
required: false
|
||||
|
||||
- name: homeserver
|
||||
description: The Matrix homeserver url to use.
|
||||
defaultValue: https://matrix.org
|
||||
type: string
|
||||
required: false
|
||||
|
||||
- name: roomid
|
||||
description: Room ID to send messages to.
|
||||
type: string
|
||||
required: false
|
||||
|
||||
- name: template
|
||||
description: |
|
||||
Golang template for the message. The [Metadata struct](https://pkg.go.dev/github.com/thegeeklab/wp-plugin-go/plugin#Metadata)
|
||||
is exposed to the template and all fields can be referenced. To extend the functionality, [sprig functions](https://masterminds.github.io/sprig/) can also be used.
|
||||
defaultValue: |
|
||||
Status: **{{ .Pipeline.Status }}**<br/>
|
||||
Build: [{{ .Repository.Owner }}/{{ .Repository.Name }}]({{ .Pipeline.Link }}){{ if .Curr.TargetBranch }} ({{ .Curr.TargetBranch }}){{ end }} by {{ .Curr.Author }}<br/>
|
||||
Message: {{ .Curr.Message }}
|
||||
type: string
|
||||
required: false
|
Loading…
Reference in New Issue
Block a user