From 8bbcbd444c1279eada73939498d79df76c135e56 Mon Sep 17 00:00:00 2001 From: thegeeklab-bot Date: Thu, 4 Jan 2024 22:55:12 +0000 Subject: [PATCH] [skip ci] auto-update documentation --- content/_index.md | 75 +++++++++++++++++++++++++++++++++++++++++++++++ data/data.yaml | 59 +++++++++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 content/_index.md create mode 100644 data/data.yaml diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..423fbde --- /dev/null +++ b/content/_index.md @@ -0,0 +1,75 @@ +--- +title: wp-gitea-release +--- + +[![Build Status](https://ci.thegeeklab.de/api/badges/thegeeklab/wp-gitea-release/status.svg)](https://ci.thegeeklab.de/repos/thegeeklab/wp-gitea-release) +[![Docker Hub](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/thegeeklab/wp-gitea-release) +[![Quay.io](https://img.shields.io/badge/quay-latest-blue.svg?logo=docker&logoColor=white)](https://quay.io/repository/thegeeklab/wp-gitea-release) +[![Go Report Card](https://goreportcard.com/badge/github.com/thegeeklab/wp-gitea-release)](https://goreportcard.com/report/github.com/thegeeklab/wp-gitea-release) +[![GitHub contributors](https://img.shields.io/github/contributors/thegeeklab/wp-gitea-release)](https://github.com/thegeeklab/wp-gitea-release/graphs/contributors) +[![Source: GitHub](https://img.shields.io/badge/source-github-blue.svg?logo=github&logoColor=white)](https://github.com/thegeeklab/wp-gitea-release) +[![License: Apache-2.0](https://img.shields.io/github/license/thegeeklab/wp-gitea-release)](https://github.com/thegeeklab/wp-gitea-release/blob/main/LICENSE) + +Woodpecker CI plugin to publish files and artifacts to Gitea releases. + + + +{{< toc >}} + + + +## Usage + +{{< hint type=note >}} +Only tag events are supported by this plugin. Running the plugin on other events will result in an error. +{{< /hint >}} + +```YAML +kind: pipeline +name: default + +steps: + - name: publish + image: quay.io/thegeeklab/wp-gitea-release + settings: + api_key: 3LbMg9Kncpdkhjp3bh3dMnKNXLjVMTsXk4sM + base_url: https://gitea.rknet.org + files: build/* +``` + +### Parameters + + + +{{< propertylist name=wp-gitea-release.data sort=name >}} + + + +## 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-gitea-release . +``` + +## Test + +```Shell +docker run --rm \ + -e PLUGIN_BASE_URL=https://try.gitea.io \ + -e PLUGIN_API_KEY=your-api-key \ + -e PLUGIN_FILES=build/* \ + -e CI_REPO_OWNER=gitea \ + -e CI_REPO_NAME=test \ + -e CI_PIPELINE_EVENT=tag \ + -v $(pwd):/build:z \ + -w /build \ + thegeeklab/wp-gitea-release +``` diff --git a/data/data.yaml b/data/data.yaml new file mode 100644 index 0000000..c8cf3ab --- /dev/null +++ b/data/data.yaml @@ -0,0 +1,59 @@ +--- +properties: + - name: api_key + description: | + Api key to access Gitea API. + type: string + required: true + + - name: base_url + description: | + URL of the Gitea instance. + type: string + required: true + + - name: checksum + description: | + Generate specific checksums. + type: list + required: false + + - name: draft + description: | + Create a draft release. + type: bool + defaultValue: false + required: false + + - name: file_exist + description: | + What to do if file already exist. + type: string + defaultValue: "overwrite" + required: false + + - name: files + description: | + List of files to upload. + type: list + required: false + + - name: note + description: | + File or string with notes for the release. + type: string + required: false + + - name: prerelease + description: | + Set the release as prerelease. + type: bool + defaultValue: false + required: false + + - name: title + description: | + File or string for the title shown in the Gitea release. + type: string + defaultValue: $CI_COMMIT_TAG + required: false