Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
lock

GitHub Action

SecretHub

v0.1.0

SecretHub

lock

SecretHub

Load secrets into your GitHub workflows

Installation

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

              

- name: SecretHub

uses: secrethub/actions@v0.1.0

Learn more about this action in secrethub/actions

Choose a version

GitHub SecretHub

GitHub Actions

CI Version Discord

SecretHub is an end-to-end encrypted secret management service that helps developers keep database passwords, API keys, and other secrets out of source code.

Actions

secrethub/actions/env-export

The env-export action reads all referenced secrets from environment variables prefixed by secrethub:// and secrets specified in the secrethub.env template file, and makes the secret values available as environment variables to the rest of the job.

It leverages GitHub's output masking feature, so if secret values are (accidentally) logged, they get replaced with *****.

Usage

on: push
jobs:
  notify-slack:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: secrethub/actions/env-export@v0.1.0
        env:
          SECRETHUB_CREDENTIAL: ${{ secrets.SECRETHUB_CREDENTIAL }}
          SLACK_WEBHOOK: secrethub://company/app/slack/webhook
      - name: Print environment with masked secrets
        run: printenv
      - name: Notify Slack
        # This action expects SLACK_WEBHOOK to be set, which is now done automatically
        uses: Ilshidur/action-slack@2.0.1
        with:
          args: Sent from GitHub Actions with secrets from SecretHub 🔑