-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathmain.go
More file actions
36 lines (29 loc) · 664 Bytes
/
Copy pathmain.go
File metadata and controls
36 lines (29 loc) · 664 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package main
import (
"fmt"
"os"
)
func main() {
opts, err := LoadOptions()
if err != nil {
fmt.Printf("failed to load options: %s", err)
os.Exit(1)
}
github, inputs := opts.GitHub, opts.Inputs
if err := resolveInputs(github, &inputs); err != nil {
fmt.Printf("failed to resolve inputs: %s", err)
os.Exit(1)
}
cmd := NewCommand(os.Stdout, os.Stderr)
if err := build(cmd, inputs); err != nil {
fmt.Printf("failed to build image: %s", err)
os.Exit(1)
}
if err := push(cmd, inputs); err != nil {
fmt.Printf("failed to push image: %s", err)
os.Exit(1)
}
if inputs.AutoTag {
setOutput("tag", inputs.Tags[len(inputs.Tags)-1])
}
}