Skip to content

Commit

Permalink
ci: add injection of CloudFlare secrets (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
SweetOps authored Mar 24, 2021
1 parent 45e16b2 commit 77043a3
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/test-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -389,16 +389,21 @@ jobs:
USES_TFE: >-
${{ contains(github.event.client_payload.github.payload.repository.name, '-tfe-')
|| contains(github.event.client_payload.pull_request.labels.*.name, 'terraform-tfe-provider') }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
GITHUB_TOKEN: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
OPSGENIE_API_KEY: ${{ secrets.OPSGENIE_API_KEY }}
DD_API_KEY: ${{ secrets.DD_API_KEY }}
DD_APP_KEY: ${{ secrets.DD_APP_KEY }}
SPOTINST_TOKEN: ${{ secrets.SPOTINST_TOKEN }}
SPOTINST_ACCOUNT: ${{ secrets.SPOTINST_ACCOUNT }}
TFE_TOKEN: ${{ secrets.TFE_TOKEN }}
USES_CLOUDFLARE: >-
${{ contains(github.event.client_payload.github.payload.repository.name, '-cloudflare-')
|| contains(github.event.client_payload.pull_request.labels.*.name, 'terraform-cloudflare-provider') }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
GITHUB_TOKEN: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
OPSGENIE_API_KEY: ${{ secrets.OPSGENIE_API_KEY }}
DD_API_KEY: ${{ secrets.DD_API_KEY }}
DD_APP_KEY: ${{ secrets.DD_APP_KEY }}
SPOTINST_TOKEN: ${{ secrets.SPOTINST_TOKEN }}
SPOTINST_ACCOUNT: ${{ secrets.SPOTINST_ACCOUNT }}
TFE_TOKEN: ${{ secrets.TFE_TOKEN }}
CLOUDFLARE_EMAIL: ${{ secrets.CLOUDFLARE_EMAIL }}
CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }}
shell: bash
run: |
if [[ "$USES_AWS" == "true" || "$USES_DATADOG" == "true" || "$USES_SPOTINST" == "true" ]]; then
Expand Down Expand Up @@ -428,6 +433,11 @@ jobs:
printf "%s=%s\n" TFE_TOKEN "$TFE_TOKEN" >> "$GITHUB_ENV"
echo exported Terraform Cloud
fi
if [[ "$USES_CLOUDFLARE" == "true" ]]; then
printf "%s=%s\n" CLOUDFLARE_EMAIL "$CLOUDFLARE_EMAIL" >> "$GITHUB_ENV"
printf "%s=%s\n" CLOUDFLARE_API_KEY "$CLOUDFLARE_API_KEY" >> "$GITHUB_ENV"
echo exported CloudFlare
fi
- name: "Test `examples/complete` with terratest"
run: make -C test/src
Expand Down

0 comments on commit 77043a3

Please sign in to comment.