chore: update domain to code.geekeey.de
This commit is contained in:
parent
7051b9beaf
commit
ab5ca1717b
1 changed files with 182 additions and 1 deletions
33
save/main.go
33
save/main.go
|
|
@ -1,4 +1,37 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"os/signal"
|
||||
|
||||
"code.geekeey.de/actions/sdk"
|
||||
)
|
||||
|
||||
func main() {
|
||||
action := &SaveArtifactAction{Action: sdk.New()}
|
||||
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt)
|
||||
defer cancel()
|
||||
if err := action.Run(ctx); err != nil {
|
||||
action.Errorf("%s", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
type SaveArtifactAction struct {
|
||||
*sdk.Action
|
||||
repository string
|
||||
path string
|
||||
reference string
|
||||
}
|
||||
|
||||
func (action *SaveArtifactAction) setup() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (action *SaveArtifactAction) Run(ctx context.Context) error {
|
||||
if err := action.setup(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue