Skip to content

Commit

Permalink
Define correct workspace on the Action
Browse files Browse the repository at this point in the history
  • Loading branch information
majori committed Nov 9, 2023
1 parent 3d715f7 commit 1ba2a18
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
3 changes: 2 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: "Jalapeno"
description: "Run Jalapeno check-updates on a project"
description: "Run Jalapeno check on the workspace"
runs:
using: "docker"
image: "docker://ghcr.io/futurice/jalapeno:v0-githubaction"
args:
- check
- --dir=/github/workspace
2 changes: 1 addition & 1 deletion cmd/action/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func main() {
delimiter := uuid.Must(uuid.NewV4()).String()
fmt.Fprintf(output, "result<<%s\n", delimiter)

// TODO: Add result
// TODO: Add outputs

fmt.Fprintf(output, "%s\n", delimiter)

Expand Down
25 changes: 12 additions & 13 deletions internal/cli/cmds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,21 +146,20 @@ func wrapCmdOutputs(ctx context.Context) (context.Context, *cobra.Command) {
}

func cleanTempDirs(ctx context.Context, sc *godog.Scenario, err error) (context.Context, error) {
if dir := ctx.Value(projectDirectoryPathCtxKey{}); dir != nil {
os.RemoveAll(dir.(string))
directoryCtxKeys := []interface{}{
projectDirectoryPathCtxKey{},
recipesDirectoryPathCtxKey{},
certDirectoryPathCtxKey{},
htpasswdDirectoryPathCtxKey{},
dockerConfigDirectoryPathCtxKey{},
}
if dir := ctx.Value(recipesDirectoryPathCtxKey{}); dir != nil {
os.RemoveAll(dir.(string))
}
if dir := ctx.Value(certDirectoryPathCtxKey{}); dir != nil {
os.RemoveAll(dir.(string))
}
if dir := ctx.Value(htpasswdDirectoryPathCtxKey{}); dir != nil {
os.RemoveAll(dir.(string))
}
if dir := ctx.Value(dockerConfigDirectoryPathCtxKey{}); dir != nil {
os.RemoveAll(dir.(string))

for _, key := range directoryCtxKeys {
if dir := ctx.Value(key); dir != nil {
os.RemoveAll(dir.(string))
}
}

return ctx, err
}

Expand Down

0 comments on commit 1ba2a18

Please sign in to comment.