From 8a71b4ee49f3704d173526d9823d4ee8950ebf79 Mon Sep 17 00:00:00 2001 From: Rotem Date: Sun, 26 Nov 2023 15:46:42 +0200 Subject: [PATCH 1/2] FR-14304 - Fix syntax --- .github/workflows/publish-prerelease.yml | 50 ++++++++++++------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/publish-prerelease.yml b/.github/workflows/publish-prerelease.yml index bb0c7e93..4de1137d 100644 --- a/.github/workflows/publish-prerelease.yml +++ b/.github/workflows/publish-prerelease.yml @@ -132,33 +132,33 @@ jobs: description: 'Dispatching E2E tests...', }); - name: Wait until NPM registry finished indexing the new version - uses: actions/github-script@v6 - with: - script: | - const checkingVersion = '${{ steps.publish_pre_release_version.outputs.LIB_VERSION }}-alpha.${{ github.run_id }}'; - const checkNpmVersions = require('./scripts/wait-for-npm-indexing.js'); - await checkNpmVersions(github, ['@frontegg/react'], checkingVersion); + uses: actions/github-script@v6 + with: + script: | + const checkingVersion = '${{ steps.publish_pre_release_version.outputs.LIB_VERSION }}-alpha.${{ github.run_id }}'; + const checkNpmVersions = require('./scripts/wait-for-npm-indexing.js'); + await checkNpmVersions(github, ['@frontegg/react'], checkingVersion); - name: "Trigger Oauth Service Pipeline Workflow" - uses: actions/github-script@v5 - env: - PR_VERSION: '${{ steps.publish_pre_release_version.outputs.LIB_VERSION }}-alpha.${{ github.run_id }}' - with: - github-token : ${{ secrets.DISPATCH_WORKFLOWS_TOKEN }} - script: | - const fe_react_version= process.env.PR_VERSION; - const owner = context.payload.repository.organization - const oauthServiceRepo = 'oauth-service' - const workflow_id = 'update-react-dependency.yaml' + uses: actions/github-script@v5 + env: + PR_VERSION: '${{ steps.publish_pre_release_version.outputs.LIB_VERSION }}-alpha.${{ github.run_id }}' + with: + github-token : ${{ secrets.DISPATCH_WORKFLOWS_TOKEN }} + script: | + const fe_react_version= process.env.PR_VERSION; + const owner = context.payload.repository.organization + const oauthServiceRepo = 'oauth-service' + const workflow_id = 'update-react-dependency.yaml' - const data = await github.rest.actions.createWorkflowDispatch({ - owner, - repo: oauthServiceRepo, - workflow_id, - ref: 'master', - inputs: { - fe_react_version, - } - }); + const data = await github.rest.actions.createWorkflowDispatch({ + owner, + repo: oauthServiceRepo, + workflow_id, + ref: 'master', + inputs: { + fe_react_version, + } + }); - name: "Trigger E2E tests" uses: actions/github-script@v5 env: From 7da17870daed45e949b822c089eddab24464ea9b Mon Sep 17 00:00:00 2001 From: Rotem Date: Sun, 26 Nov 2023 15:47:23 +0200 Subject: [PATCH 2/2] FR-14304 - Fix syntax --- .github/workflows/publish.yml | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 69eee1bd..5ac791bb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -100,33 +100,33 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} - name : Wait until NPM registry finished indexing the new version - uses : actions/github-script@v6 - with : - script : | - const checkingVersion = '${{ steps.set_current_version.outputs.CURRENT_VERSION }}'; - const checkNpmVersions = require('./scripts/wait-for-npm-indexing.js'); - await checkNpmVersions(github, ['@frontegg/react'], checkingVersion); + uses : actions/github-script@v6 + with : + script : | + const checkingVersion = '${{ steps.set_current_version.outputs.CURRENT_VERSION }}'; + const checkNpmVersions = require('./scripts/wait-for-npm-indexing.js'); + await checkNpmVersions(github, ['@frontegg/react'], checkingVersion); - name : "Trigger Oauth Service Pipeline Workflow" - uses : actions/github-script@v5 - env : - PR_VERSION : '${{ steps.set_current_version.outputs.CURRENT_VERSION }}' - with : - github-token : ${{ secrets.DISPATCH_WORKFLOWS_TOKEN }} - script : | - const fe_react_version= process.env.PR_VERSION; - const owner = context.payload.repository.organization - const oauthServiceRepo = 'oauth-service' - const workflow_id = 'update-react-dependency.yaml' + uses : actions/github-script@v5 + env : + PR_VERSION : '${{ steps.set_current_version.outputs.CURRENT_VERSION }}' + with : + github-token : ${{ secrets.DISPATCH_WORKFLOWS_TOKEN }} + script : | + const fe_react_version= process.env.PR_VERSION; + const owner = context.payload.repository.organization + const oauthServiceRepo = 'oauth-service' + const workflow_id = 'update-react-dependency.yaml' - const data = await github.rest.actions.createWorkflowDispatch({ - owner, - repo: oauthServiceRepo, - workflow_id, - ref: 'master', - inputs: { - fe_react_version, - } - }); + const data = await github.rest.actions.createWorkflowDispatch({ + owner, + repo: oauthServiceRepo, + workflow_id, + ref: 'master', + inputs: { + fe_react_version, + } + }); - name: Notify Slack on deployment uses: rtCamp/action-slack-notify@v2 env: