prepare next release

This commit is contained in:
Tobias Trabelsi 2023-01-04 19:15:00 +01:00
parent 14c1a11417
commit 8095c2a513
No known key found for this signature in database
GPG key ID: FF0C2839718CAF2E
6 changed files with 39 additions and 5 deletions

View file

@ -3,7 +3,7 @@ GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
GOFMT ?= gofmt -s GOFMT ?= gofmt -s
VERSION = 0.11.2 VERSION = 0.12.0
test: fmt-check test: fmt-check
go test -i $(TEST) || exit 1 go test -i $(TEST) || exit 1

View file

@ -17,7 +17,7 @@ terraform {
required_providers { required_providers {
gitea = { gitea = {
source = "Lerentis/gitea" source = "Lerentis/gitea"
version = "0.11.2" version = "0.12.0"
} }
} }
} }

View file

@ -16,6 +16,15 @@ Every key needs a unique name and unique key, i.e. no key can be added twice to
## Example Usage ## Example Usage
```terraform ```terraform
terraform {
required_providers {
tls = {
source = "hashicorp/tls"
version = "4.0.4"
}
}
}
resource "tls_private_key" "example" { resource "tls_private_key" "example" {
type = "RSA" type = "RSA"
rsa_bits = 4096 rsa_bits = 4096

View file

@ -2,7 +2,7 @@ terraform {
required_providers { required_providers {
gitea = { gitea = {
source = "terraform.local/lerentis/gitea" source = "terraform.local/lerentis/gitea"
version = "0.11.2" version = "0.12.0"
} }
} }
} }

View file

@ -0,0 +1,25 @@
terraform {
required_providers {
tls = {
source = "hashicorp/tls"
version = "4.0.4"
}
}
}
resource "tls_private_key" "example" {
type = "RSA"
rsa_bits = 4096
}
resource "gitea_repository" "example" {
name = "example"
private = true
}
resource "gitea_repository_key" "example" {
repository = gitea_repository.example.id
title = "Example Deploy Key"
read_only = true
key = tls_private_key.example.public_key_openssh
}

View file

@ -24,11 +24,11 @@ func resourceRepoKeyIdParts(d *schema.ResourceData) (bool, int64, int64, error)
repoId, err := strconv.ParseInt(parts[0], 10, 64) repoId, err := strconv.ParseInt(parts[0], 10, 64)
if err != nil { if err != nil {
return true, 0, 0, err return false, 0, 0, err
} }
keyId, err := strconv.ParseInt(parts[1], 10, 64) keyId, err := strconv.ParseInt(parts[1], 10, 64)
if err != nil { if err != nil {
return true, 0, 0, err return false, 0, 0, err
} }
return true, repoId, keyId, err return true, repoId, keyId, err
} }