Gitea Release

kind: gitea/release

sourceconditiontarget

Description

The Gitea "release" plugin allows to manipulate Gitea releases.

source

When used as a "source", the Gitea release plugin allows to get a Gitea Release tag according the version filter rule provided.

condition

When used as a "condition". the Gitea release plugin allows to test that specific Gitea Release tag exist.

target

When used a "target", the Gitea release plugin Using the gitea/release as a "target" ensures that a Gitea release exists.

Parameters

NameTypeDescriptionRequired
commitishstring[T] Commitish defines the commit-ish such as `main`
draftboolean[T] Draft defines if the release is a draft release
drescriptionstring[T] Drescription defines if the new release description
ownerstring[S][C][T] Owner specifies repository owner
prereleaseboolean[T] Prerelease defines if the release is a pre-release release
repositorystring[S][C][T]Repository specifies the name of a repository for a specific owner
tagstring[C][T] Tag defines the Gitea release tag.
titlestring[T] Title defines the Gitea release title.
tokenstring[S][C][T] Token specifies the credential used to authenticate with
urlstring[S][C][T] URL specifies the default github url in case of Gitea enterprise
usernamestring[S][C][T] Username specifies the username used to authenticate with Gitea API
versionfilterobject[S] VersionFilter provides parameters to specify version pattern and its type like regex, semver, or just latest.
    kindstringSpecifies the version kind such as semver, regex, or latest
    patternstringSpecifies the version pattern according the version kind

Example

# updatecli.yaml
name: Show Gitea release usage

sources:
  default:
    name: Retrieve latest release matching versionFilter rule
    kind: gitea/release  
    spec:
      url: "try.gitea.io"
      owner: olblak
      repository: updatecli-test
      versionfilter:
        kind: semver
        pattern: "~0"
    
conditions:
  default:
    name: Test that release "0.0.2" exist 
    kind: gitea/release  
    spec:
      url: "try.gitea.io"
      owner: olblak
      repository: updatecli-test
      tag: "0.0.2"
  sourcedefault:
    name: Test that release retrieved from source 'default' exist
    kind: gitea/release  
    sourceid: default
    spec:
      url: "try.gitea.io"
      owner: olblak
      repository: updatecli-test

targets:
  default:
    name: "Ensure release 0.0.1 from branch main exist"
    kind: gitea/release  
    spec:
      url: "try.gitea.io"
      owner: olblak
      repository: updatecli-test
      commitish: main
      token: xxx
      tag: "0.0.1"
  sourcedefault:
    name: "Ensure release where tag is retrieved from source 'default' from branch main exist"
    kind: gitea/release  
    sourceid: default
    spec:
      url: "try.gitea.io"
      owner: olblak
      repository: updatecli-test
      token: xxx
      commitish: main

Top