From a2e483c49c316ed70ca8b6f66fb9564881635219 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Mon, 22 Aug 2022 12:14:39 -0400 Subject: [PATCH] Fix workflow variable usage maybe? --- .github/workflows/sdk-update-api-spec.yaml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/sdk-update-api-spec.yaml b/.github/workflows/sdk-update-api-spec.yaml index f9422d7ef..b33a434c8 100644 --- a/.github/workflows/sdk-update-api-spec.yaml +++ b/.github/workflows/sdk-update-api-spec.yaml @@ -20,23 +20,29 @@ jobs: check-latest: true cache: npm + - name: Download stable OpenAPI schema + run: | + curl -sL https://repo.jellyfin.org/releases/openapi/jellyfin-openapi-stable.json -o openapi.json + npm run fix-schema + + - name: Set STABLE_API_VERSION + run: | + VERSION=$(jq -r .info.version openapi.json) + echo "STABLE_API_VERSION=${VERSION}" >> $GITHUB_ENV + - name: Install Node.js dependencies run: npm ci --no-audit - name: Update generated sources and create pull request uses: technote-space/create-pr-action@95c1e76dc9b65848afe397ea156666021f2e8243 # tag=v2 with: - EXECUTE_COMMANDS: | - curl -sL https://repo.jellyfin.org/releases/openapi/jellyfin-openapi-stable.json -o openapi.json - STABLE_API_VERSION=$(jq -r .info.version openapi.json) - npm run fix-schema - npm run build:generated-client - COMMIT_MESSAGE: 'Update generated sources to ${STABLE_API_VERSION}' + EXECUTE_COMMANDS: npm run build:generated-client + COMMIT_MESSAGE: 'Update generated sources to ${{ env.STABLE_API_VERSION }}' COMMIT_NAME: 'jellyfin-bot' COMMIT_EMAIL: 'team@jellyfin.org' PR_BRANCH_PREFIX: 'openapi-update-' PR_BRANCH_NAME: '${PR_ID}' - PR_TITLE: 'Update OpenAPI to ${STABLE_API_VERSION}' + PR_TITLE: 'Update OpenAPI to ${{ env.STABLE_API_VERSION }}' PR_BODY: | ## Changed files