{"id":15791232,"url":"https://github.com/levonet/action-consul-kv","last_synced_at":"2025-10-05T02:39:36.533Z","repository":{"id":48032366,"uuid":"394034014","full_name":"levonet/action-consul-kv","owner":"levonet","description":"GitHub Action that manipulates entries in the key/value store of a Consul cluster","archived":false,"fork":false,"pushed_at":"2021-08-10T18:55:50.000Z","size":88,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-11T23:04:09.327Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/levonet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-08T18:00:52.000Z","updated_at":"2021-08-10T18:59:32.000Z","dependencies_parsed_at":"2022-08-12T17:10:31.593Z","dependency_job_id":null,"html_url":"https://github.com/levonet/action-consul-kv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/levonet/action-consul-kv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Faction-consul-kv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Faction-consul-kv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Faction-consul-kv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Faction-consul-kv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levonet","download_url":"https://codeload.github.com/levonet/action-consul-kv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levonet%2Faction-consul-kv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278400598,"owners_count":25980564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-04T23:00:27.778Z","updated_at":"2025-10-05T02:39:36.494Z","avatar_url":"https://github.com/levonet.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Action: Manipulate entries in the key/value store of a Consul cluster\n\nAllows the retrieval, addition, modification and deletion of key/value entries in a Consul cluster via the agent or server.\nThe entire contents of the record, including the indices, flags and session are returned as `value`.\n\nWhen a value is removed, the existing value if any is returned as part of the results.\nThis behavior is valid for non-recursive deletion.\n\nSee [KV Store](https://www.consul.io/api-docs/kv) for more details.\n\n## Example usage\n\n```yml\n- name: Set value\n  uses: blablacar/action-consul-kv@master\n  with:\n    key: foo\n    value: bar\n\n- name: Get value\n  id: consul\n  uses: blablacar/action-consul-kv@master\n  with:\n    key: foo\n\n- run: echo ${{ steps.consul.outputs.data }}  # bar\n```\n\n## Inputs\n\n### `state`\n\nThe action to take with the supplied key and value.\nIf the state is `present` and `value` is set, the key contents will be set to the value supplied and `changed`\nwill be set to `true` only if the value was different to the current contents.\nIf the state is `present` and `value` is not set, the existing value associated to the key will be returned.\n\nThe state `absent` will remove the key/value pair, again 'changed' will be set to true only\nif the key actually existed prior to the removal.\n\nAn attempt can be made to obtain or free the lock associated with a key/value pair with the states `acquire`\nor attempt changed will be true if the attempt is successful, false otherwise.\n\nPossible values are `present`, `absent`, `acquire` and `release` (`acquire` and `release` are experimental).\n\nDefault: `present`.\n\n### `key`\n\n**Required** The key at which the value should be stored.\n\n### `value`\n\nThe value should be associated with the given key, required if `state` is `present`.\n\n### `host`\n\nHost of the consul agent.\n\nDefault: `localhost`\n\n### `port`\n\nThe port on which the consul agent is running.\n\nDefault: `8500`\n\n### `scheme`\n\nThe protocol scheme on which the consul agent is running.\n\nDefault: `http`\n\n### `ca`\n\nOptional.\nTrusted certificates in PEM format.\n\n### `dc`\n\nOptional.\nThe datacenter that this agent will communicate with. By default the datacenter of the host is used.\n\n### `token`\n\nOptional.\nThe token key identifying an ACL rule set that controls access to the key value pair.\n\n### `recurse`\n\nIf the key represents a prefix, each entry with the prefix can be retrieved by setting this to `true`.\n\nDefault: `false`\n\n### `retrieve`\n\nIf the `state` is `present` and `value` is set, perform a read after setting the value and return this value.\n\nDefault: `true`\n\n### `session`\n\nExperimental.\nThe session that should be used to acquire or release a lock associated with a key/value pair.\n\n### `cas`\n\nExperimental.\nUsed when acquiring a lock with a session. If the `cas` is `0`, then Consul will only put the key if it does not already exist.\nIf the `cas` value is non-zero, then the key is only set if the index matches the ModifyIndex of that key.\n\n## Outputs\n\n### `changed`\n\nReturns `true` if the key or key value has been changed.\n\n### `data`\n\nA string label to differentiate this status from the status of other systems.\nFor recursive requests, contains a serialized object with k/v.\n\nOptional, returned if the key exists.\n\n### `flags`\n\nFlags opaque to user, can be used by application.\nOptional.\n\n### `index`\n\nModifyIndex to block and wait for changes.\nOptional.\n\n# License\n\nThe scripts and documentation in this project are released under the [MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevonet%2Faction-consul-kv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevonet%2Faction-consul-kv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevonet%2Faction-consul-kv/lists"}