Skip to content
database

GitHub Action

Consul Fetcher

v1.1 Latest version

Consul Fetcher

database

Consul Fetcher

A Github Action that sets environment variables retrieved from Consul

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Consul Fetcher

uses: FDuhen/[email protected]

Learn more about this action in FDuhen/consul-fetcher-action

Choose a version

Consul Fetcher javascript action

This action retrieves key/values from a Consul and sets it as environment variables

Inputs

url

Required The Consul's Url to retrieve your KV.

token

Required The Consul's Token to retrieve your KV.

path

Required The path where you want retrieve all your keys/values from Consul. Could be the path to a folder or the complete path to a single key.

Example usage

uses: fduhen/[email protected]
with:
  url: 'https://consul-url.com'
  token: 'myGeneratedTokenFromConsul'
  path: 'CI'

TODO

* [ ] Code cleanup
* [ ] Correctly managing async functions
* [ ] Managing status code errors

Security

The env vars which are created after reading the values from Consul are automatically masked in order to prevent any leak of sensitive datas.
Note that it only obscurs the values from the logs.