Skip to content

Commit

Permalink
Use new Action
Browse files Browse the repository at this point in the history
  • Loading branch information
majori committed Nov 24, 2023
1 parent 7e5bd36 commit 3fff355
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 7 additions & 2 deletions cmd/action/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ const (
OutputExitCode = "exitcode"
)

var (
// https://goreleaser.com/cookbooks/using-main.version/
version string
)

// This is the entrypoint for the Github Action
func main() {
if os.Getenv("GITHUB_ACTIONS") != "true" {
Expand All @@ -30,13 +35,13 @@ func main() {
out := io.MultiWriter(os.Stdout, output)

// Since arguments are passed as a single string, we need to split them
args, err := shellwords.Split(os.Args[1])
args, err := shellwords.SplitPosix(os.Args[1])
checkErr(err)

delimiter := uuid.Must(uuid.NewV4()).String()
fmt.Fprintf(output, "%s<<%s\n", OutputResult, delimiter)

cmd := cli.NewRootCmd("")
cmd := cli.NewRootCmd(version)
cmd.SetOut(out)
cmd.SetArgs(args)

Expand Down
4 changes: 3 additions & 1 deletion examples/github-action/templates/.github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ jobs:
registry: ghcr.io
username: {{ "${{ github.actor }}" }}
password: {{ "${{ secrets.GITHUB_TOKEN }}" }}
- uses: futurice/jalapeno@v0.1.20
- uses: futurice/jalapeno@main
id: jalapeno
with:
cmd: check
- if: steps.jalapeno.outputs.exit-code == '2'
run: echo "::notice::Jalapeno updates available"

0 comments on commit 3fff355

Please sign in to comment.