Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add secrets on ci check #209

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/ci-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,22 @@ on:
required: false
default: '/usr/share/dotnet'
description: Set a custom .NET install dir
## Vault Secrets
VAULT_SECRETS:
type: string
default: ''
description: 'A comma separated list of secrets to fetch from Vault.'
required: false
TELEPORT_APP:
type: string
default: ''
description: 'The Teleport app to use.'
required: false
TELEPORT_PROXY_URL:
type: string
default: ''
description: 'The Teleport proxy URL to use.'
required: false
secrets:
SONAR_HOST_URL:
required: false
Expand All @@ -98,6 +114,13 @@ on:
CONTRIBSYS_CREDENTIALS:
required: false
description: Contribsys credentials used for ruby gems
# Vault Secrets
VAULT_TOKEN:
required: false
description: 'Vault token.'
TELEPORT_TOKEN:
required: false
description: 'Teleport token.'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down Expand Up @@ -126,6 +149,17 @@ jobs:
ref: main
path: actions

- name: Retrieve Secrets from HashiCorp Vault
uses: ./actions/.github/actions/vault-secrets
if: ${{ inputs.VAULT_SECRETS != '' }}
env:
VAULT_TOKEN: ${{ secrets.VAULT_TOKEN }}
VAULT_ADDR: https://${{ inputs.TELEPORT_PROXY_URL }}
TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }}
TELEPORT_APP: ${{ inputs.TELEPORT_APP }}
TELEPORT_PROXY_URL: ${{ inputs.TELEPORT_PROXY_URL }}
SECRETS: ${{ inputs.VAULT_SECRETS }}

- name: Up Test dependencies
if: ${{ inputs.TEST_DEPENDENCIES == true}}
uses: ./actions/.github/actions/docker-compose
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,18 @@ jobs:
RUBOCOP: ${{ inputs.RUBOCOP }}
RUN_TESTS: ${{ inputs.RUN_TESTS }}
DOTNET_INSTALL_DIR: ${{ inputs.DOTNET_INSTALL_DIR }}
VAULT_SECRETS: ${{ inputs.VAULT_SECRETS }}
TELEPORT_APP: ${{ inputs.TELEPORT_APP }}
TELEPORT_PROXY_URL: ${{ inputs.TELEPORT_PROXY_URL }}
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_PROJECT_KEY: ${{ secrets.SONAR_PROJECT_KEY }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
GH_BOT_DEPLOY_KEY: ${{ secrets.GH_BOT_DEPLOY_KEY }}
VAULT_TOKEN: ${{ secrets.VAULT_TOKEN }}
TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }}

BUILD:
name: BUILD
Expand Down