diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b46770a..391733b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -329,15 +329,18 @@ jobs: --overwrite - name: Demo App URL - uses: octokit/request-action@v2.x + uses: actions/github-script@v7 with: - route: POST /repos/{owner}/{repo}/statuses/${{ github.event.pull_request.head.sha || github.sha }} - owner: ${{ github.repository_owner }} - repo: ${{ github.event.repository.name }} - state: success - target_url: https://${{ steps.getCDKExports.outputs.edgeDomain }}${{ steps.getCDKExports.outputs.prefix }}/${{ env.DEMO_APP_NAME }}/?appver=0.0.0 - description: 'Passed' - context: 'Demo App URL on ${{ matrix.deployName }}' + script: | + await github.rest.repos.createCommitStatus({ + owner: context.repo.owner, + repo: context.repo.repo, + sha: context.sha, + context: 'Demo App URL on ${{ matrix.deployName }}', + state: 'success', + description: 'Passed', + target_url: `https://${{ steps.getCDKExports.outputs.edgeDomain }}${{ steps.getCDKExports.outputs.prefix }}/${{ env.DEMO_APP_NAME }}/?appver=0.0.0` + }); env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -387,15 +390,18 @@ jobs: --overwrite - name: Demo App URL - Root App - uses: octokit/request-action@v2.x + uses: actions/github-script@v7 with: - route: POST /repos/{owner}/{repo}/statuses/${{ github.event.pull_request.head.sha || github.sha }} - owner: ${{ github.repository_owner }} - repo: ${{ github.event.repository.name }} - context: 'Demo App (Root App) URL on ${{ matrix.deployName }}' - description: 'Passed' - state: success - target_url: https://${{ steps.getCDKExports.outputs.edgeDomain }}${{ steps.getCDKExports.outputs.prefix }}/?appver=${{ env.PACKAGE_VERSION }} + script: | + await github.rest.repos.createCommitStatus({ + owner: context.repo.owner, + repo: context.repo.repo, + sha: context.sha, + context: 'Demo App (Root App) URL on ${{ matrix.deployName }}', + state: 'success', + description: 'Passed', + target_url: `https://${{ steps.getCDKExports.outputs.edgeDomain }}${{ steps.getCDKExports.outputs.prefix }}/?appver=${{ env.PACKAGE_VERSION }}` + }); env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -423,15 +429,18 @@ jobs: --overwrite - name: Nextjs Demo App URL - uses: octokit/request-action@v2.x + uses: actions/github-script@v7 with: - route: POST /repos/{owner}/{repo}/statuses/${{ github.event.pull_request.head.sha || github.sha }} - owner: ${{ github.repository_owner }} - repo: ${{ github.event.repository.name }} - context: 'Nextjs Demo App URL on ${{ matrix.deployName }}' - description: 'Passed' - state: success - target_url: https://${{ steps.getCDKExports.outputs.edgeDomain }}${{ steps.getCDKExports.outputs.prefix }}/${{ env.NEXTJS_DEMO_APP_NAME }}?appver=${{ needs.build.outputs.nextjsDemoAppPackageVersion }} + script: | + await github.rest.repos.createCommitStatus({ + owner: context.repo.owner, + repo: context.repo.repo, + sha: context.sha, + context: 'Nextjs Demo App URL on ${{ matrix.deployName }}', + state: 'success', + description: 'Passed', + target_url: `https://${{ steps.getCDKExports.outputs.edgeDomain }}${{ steps.getCDKExports.outputs.prefix }}/${{ env.NEXTJS_DEMO_APP_NAME }}?appver=${{ needs.build.outputs.nextjsDemoAppPackageVersion }}` + }); env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -458,15 +467,18 @@ jobs: --overwrite - name: Release App URL - uses: octokit/request-action@v2.x + uses: actions/github-script@v7 with: - route: POST /repos/{owner}/{repo}/statuses/${{ github.event.pull_request.head.sha || github.sha }} - owner: ${{ github.repository_owner }} - repo: ${{ github.event.repository.name }} - context: 'Release App URL on ${{ matrix.deployName }}' - description: 'Passed' - state: success - target_url: https://${{ steps.getCDKExports.outputs.edgeDomain }}${{ steps.getCDKExports.outputs.prefix }}/${{ env.RELEASE_APP_NAME }}?appver=${{ needs.build.outputs.releaseAppPackageVersion }} + script: | + await github.rest.repos.createCommitStatus({ + owner: context.repo.owner, + repo: context.repo.repo, + sha: context.sha, + context: 'Release App URL on ${{ matrix.deployName }}', + state: 'success', + description: 'Passed', + target_url: `https://${{ steps.getCDKExports.outputs.edgeDomain }}${{ steps.getCDKExports.outputs.prefix }}/${{ env.RELEASE_APP_NAME }}?appver=${{ needs.build.outputs.releaseAppPackageVersion }}` + }); env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}