We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/remotebrowser/mcp-getgather'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
action.yml•2.11 KiB
name: Load the environment variables from Doppler
description: Load the environment variables from Doppler into the GitHub environment
inputs:
doppler-token:
description: Doppler token for authentication
required: true
project:
description: Doppler project name, which should be the same as the serivce and github repo
required: true
config:
description: Doppler config / environment name
required: false
default: github
runs:
using: composite
steps:
- name: Load the environment variables from Doppler
shell: bash
run: |-
curl -H "authorization: Bearer ${{ inputs.doppler-token }}" \
"https://api.doppler.com/v3/configs/config/secrets/download?project=${{ inputs.project }}&config=${{ inputs.config }}&format=json" \
-o .doppler-secrets.json
# Clear .env file if it exists
> .env
cat .doppler-secrets.json | jq -r 'to_entries[] | @json' | while read -r entry; do
key=$(echo "$entry" | jq -r '.key')
value=$(echo "$entry" | jq -r '.value')
# Mask the entire secret value
echo "::add-mask::${value}"
# For multiline secrets, also mask each line individually
while IFS= read -r line; do
if [ -n "$line" ]; then
echo "::add-mask::${line}"
fi
done <<< "$value"
# Use heredoc format for multiline values to support SSH keys (for GITHUB_ENV)
echo "${key}<<EOF" >> $GITHUB_ENV
echo "$value" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
# For .env file, write as KEY=VALUE for Fly compatibility
# Use printf to properly escape the value and replace newlines with literal \n
printf '%s=%s\n' "$key" "$(printf '%s' "$value" | sed ':a;N;$!ba;s/\n/\\n/g')" >> .env
done
echo "✅ Successfully loaded the following environment variables from Doppler for project ${{ inputs.project }} in config ${{ inputs.config }}:"
cat .doppler-secrets.json | jq -r 'to_entries[] | .key'
echo "✅ Created .env file with environment variables"
rm .doppler-secrets.json