Skip to content

Commit

Permalink
Refactor to new actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
lexbritvin committed Dec 22, 2024
1 parent c92eb70 commit f9e789b
Show file tree
Hide file tree
Showing 9 changed files with 208 additions and 159 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
whoami
make deps build
ls -lah bin/launchr
./bin/launchr login --url=http://***.git --username="***" --password="***" --keyring-passphrase="***"
./bin/launchr keyring:login --url=http://***.git --username="***" --password="***" --keyring-passphrase="***"
commands-ok:
name: Ensure main commands do not fail
Expand All @@ -39,9 +39,9 @@ jobs:
whoami
make deps build
ls -lah bin/launchr
./bin/launchr set vaultpass --value "***" --keyring-passphrase "***"
./bin/launchr keyring:set vaultpass --value "***" --keyring-passphrase "***"
ls -lah .launchr/keyring.yaml.age
./bin/launchr unset vaultpass --keyring-passphrase "***"
./bin/launchr keyring:unset vaultpass --keyring-passphrase "***"
ls -lah .launchr/keyring.yaml.age
go-linters:
Expand Down
15 changes: 15 additions & 0 deletions action.login.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
runtime: plugin
action:
title: "Keyring: Log in"
description: >-
Logs in to services like git, docker, etc.
options:
- name: url
title: URL
default: ""
- name: username
title: Username
default: ""
- name: password
title: Password
default: ""
16 changes: 16 additions & 0 deletions action.logout.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
runtime: plugin
action:
title: "Keyring: Log out"
description: >-
Logs out from a service
arguments:
- name: url
title: URL
description: URL to log out
minLength: 1
options:
- name: all
title: All
description: Logs out from all services
type: boolean
default: false
4 changes: 4 additions & 0 deletions action.purge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
runtime: plugin
action:
title: "Keyring: Purge"
description: Remove existing keyring file
14 changes: 14 additions & 0 deletions action.set.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
runtime: plugin
action:
title: "Keyring: Set"
description: >-
Store new key-value pair to keyring
arguments:
- name: key
title: Key
description: Key of the value
required: true
minLength: 1
- name: value
title: Value
description: Value
16 changes: 16 additions & 0 deletions action.unset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
runtime: plugin
action:
title: "Keyring: Unset"
description: >-
Removes key-value pair from keyring
arguments:
- name: key
title: Key
description: Key to delete
minLength: 1
options:
- name: all
title: All
description: "Removes all key-pairs"
type: boolean
default: false
40 changes: 20 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
module github.com/launchrctl/keyring

go 1.23.1
go 1.23.2

toolchain go1.23.4

require (
filippo.io/age v1.2.0
github.com/launchrctl/launchr v0.16.4
github.com/spf13/cobra v1.8.1
golang.org/x/term v0.25.0
filippo.io/age v1.2.1
github.com/launchrctl/launchr v0.16.5-0.20241222204415-24d5b3d7ff0c
golang.org/x/term v0.27.0
gopkg.in/yaml.v3 v3.0.1
)

Expand All @@ -20,7 +21,7 @@ require (
github.com/containerd/console v1.0.4 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/docker v27.3.1+incompatible // indirect
github.com/docker/docker v27.4.1+incompatible // indirect
github.com/docker/go-connections v0.5.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
Expand All @@ -32,7 +33,6 @@ require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/knadh/koanf v1.5.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/lithammer/fuzzysearch v1.1.8 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
Expand All @@ -49,28 +49,28 @@ require (
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pterm/pterm v0.12.79 // indirect
github.com/pterm/pterm v0.12.80 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.13.1 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/cobra v1.8.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 // indirect
go.opentelemetry.io/otel v1.31.0 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect
go.opentelemetry.io/otel v1.33.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 // indirect
go.opentelemetry.io/otel/metric v1.31.0 // indirect
go.opentelemetry.io/otel/trace v1.31.0 // indirect
go.opentelemetry.io/otel/metric v1.33.0 // indirect
go.opentelemetry.io/otel/trace v1.33.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
go.uber.org/mock v0.5.0 // indirect
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect
google.golang.org/grpc v1.67.1 // indirect
google.golang.org/protobuf v1.35.1 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
)
Loading

0 comments on commit f9e789b

Please sign in to comment.