Rewrite rust (#38)
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

Co-authored-by: kjuulh <contact@kjuulh.io>
Reviewed-on: #38
This commit is contained in:
2022-11-27 11:21:35 +00:00
parent 0d6e8bc4a0
commit 991861db99
445 changed files with 53358 additions and 2568 deletions

View File

@@ -1,4 +1,4 @@
apiVersion: git.front.kjuulh.io/kjuulh/octopush/blob/main/schema/v1
apiVersion: action
name: write-a-readme
select:
repositories:

BIN
_examples/actions/write_a_readme/dist/bin vendored Executable file

Binary file not shown.

Binary file not shown.

View File

@@ -1,12 +1,38 @@
package main
import "github.com/bitfield/script"
import (
"os"
"github.com/bitfield/script"
)
func main() {
_, err := script.
Echo("# Readme").
WriteFile("README.md")
if err != nil {
panic(err)
}
println("ran stuff")
entries, err := os.ReadDir(".")
if err != nil {
panic(err)
}
for _, entry := range entries {
if !entry.IsDir() {
file, err := os.ReadFile(entry.Name())
if err != nil {
panic(err)
}
println(string(file))
}
}
wd, err := os.Getwd()
if err != nil {
panic(err)
}
println(wd)
}

View File

@@ -1,11 +1,26 @@
apiVersion: git.front.kjuulh.io/kjuulh/octopush/blob/main/schema/v1
apiVersion: action
name: write-a-readme
select:
repositories:
- git@git.front.kjuulh.io:kjuulh/octopush-test.git
# providers:
# - gitea: https://git.front.kjuulh.io
# organisation: "cibus"
actions:
- type: go
entry: "main.go"
# github:
# repositories:
# - kjuulh/octopush-test
# push:
# pull-request:
# name: "write a readme"
# gitea:
# repositories:
# - kjuulh/octopush-test
# push:
# pull-request:
# name: "write a readme"
git:
repositories:
- git@git.front.kjuulh.io:kjuulh/octopush-test.git
push:
branch:
name: "write a readme"
action:
type: go
entry: "main.go"