From 49040b41ad92b879144dfa4337922fade0ff3a86 Mon Sep 17 00:00:00 2001 From: Moritz Sternemann Date: Sun, 31 Mar 2024 20:53:49 +0200 Subject: [PATCH] Use matrix for environment, use environment vars --- .github/workflows/export.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/export.yml b/.github/workflows/export.yml index 9614796..0c3f4cd 100644 --- a/.github/workflows/export.yml +++ b/.github/workflows/export.yml @@ -18,6 +18,10 @@ jobs: run: working-directory: ./exporter + strategy: + matrix: + environment: [development, production] + steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} @@ -28,10 +32,12 @@ jobs: cache-dependency-path: exporter/yarn.lock - run: yarn install --frozen-lockfile - - name: Export development schema - run: yarn start development - - name: Export production schema - run: yarn start production + - name: Export schema for environment + env: + - CKTOOL_MGMT_TOKEN: ${{ secrets.CKTOOL_MGMT_TOKEN }} + - TEAM_ID: ${{ secrets.TEAM_ID }} + - CONTAINER_ID: ${{ secrets.CONTAINER_ID }} + run: yarn start ${{ matrix.environment }} # Commit all changed files back to the repository - uses: stefanzweifel/git-auto-commit-action@v5