From 4e5118ebbcd64a3349ebdefb5f2a40adcf07e8b9 Mon Sep 17 00:00:00 2001 From: Francesco Menghi <53121061+menghif@users.noreply.github.com> Date: Mon, 11 Apr 2022 14:03:23 -0400 Subject: [PATCH] Pass secrets into workflow --- .github/workflows/continuous-integration.yml | 6 ++++++ .github/workflows/eslint-ci.yml | 13 ++++++++++--- .github/workflows/unit-tests-ci.yml | 13 ++++++++++--- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 49cb0962a1..159d2342cb 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -18,10 +18,16 @@ jobs: # Make sure eslint passes eslint: uses: Seneca-CDOT/telescope/.github/workflows/eslint-ci.yml@master + secrets: + github-token: ${{ secrets.GITHUB_TOKEN }} + turborepo-token: ${{ secrets.TURBO_SERVER_TOKEN }} # Run unit tests on all platforms/versions of node unit: uses: Seneca-CDOT/telescope/.github/workflows/unit-tests-ci.yml@master + secrets: + github-token: ${{ secrets.GITHUB_TOKEN }} + turborepo-token: ${{ secrets.TURBO_SERVER_TOKEN }} # Run end-to-end tests along with the microservices in docker-compose on Linux e2e: diff --git a/.github/workflows/eslint-ci.yml b/.github/workflows/eslint-ci.yml index 85e3b0d780..4ad535a2f7 100644 --- a/.github/workflows/eslint-ci.yml +++ b/.github/workflows/eslint-ci.yml @@ -2,6 +2,13 @@ name: ESLint Workflow on: workflow_call: + secrets: + github-token: + description: 'The GitHub authentication token' + required: true + turborepo-token: + description: 'The Turborepo local server token' + required: true jobs: # Make sure eslint passes @@ -18,10 +25,10 @@ jobs: - name: Turborepo local server uses: felixmosh/turborepo-gh-artifacts@v1 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - server-token: ${{ secrets.TURBO_SERVER_TOKEN }} + repo-token: ${{ secrets.github-token }} + server-token: ${{ secrets.turborepo-token }} - name: Install dependencies and run eslint run: | pnpm install - pnpm turbo run lint --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}" + pnpm turbo run lint --api="http://127.0.0.1:9080" --token="${{ secrets.server-token }}" diff --git a/.github/workflows/unit-tests-ci.yml b/.github/workflows/unit-tests-ci.yml index c490681578..ebad450a8f 100644 --- a/.github/workflows/unit-tests-ci.yml +++ b/.github/workflows/unit-tests-ci.yml @@ -2,6 +2,13 @@ name: Unit Tests Workflow on: workflow_call: + secrets: + github-token: + description: 'The GitHub authentication token' + required: true + turborepo-token: + description: 'The Turborepo local server token' + required: true jobs: unit: @@ -22,10 +29,10 @@ jobs: - name: Turborepo local server uses: felixmosh/turborepo-gh-artifacts@v1 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - server-token: ${{ secrets.TURBO_SERVER_TOKEN }} + repo-token: ${{ secrets.github-token }} + server-token: ${{ secrets.turborepo-token }} - name: Install dependencies and run tests with default env run: | pnpm install - pnpm turbo run test --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}" + pnpm turbo run test --api="http://127.0.0.1:9080" --token="${{ secrets.server-token }}"