You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2024/01/10 13:08:26 UTC

(camel-website) branch main updated: fix: update preview

This is an automated email from the ASF dual-hosted git repository.

zregvart pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 3b275bb2 fix: update preview
3b275bb2 is described below

commit 3b275bb25932001808ff834859fa855ead28b6ac
Author: Zoran Regvart <zo...@regvart.com>
AuthorDate: Wed Jan 10 14:08:21 2024 +0100

    fix: update preview
    
    The toolkit REST APIs are now in `github.rest.actions` rather than in
    `github.actions`.
---
 .github/workflows/preview.yaml | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml
index 4aaa2a27..25238876 100644
--- a/.github/workflows/preview.yaml
+++ b/.github/workflows/preview.yaml
@@ -31,12 +31,12 @@ jobs:
     if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
     steps:
       - name: Checkout
-        uses: actions/checkout@v4
+        uses: actions/checkout@v2
       - name: Download pull request artifact
-        uses: actions/github-script@v7
+        uses: actions/github-script@v4
         with:
           script: |
-            const artifacts = await github.actions.listWorkflowRunArtifacts({
+            const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
                owner: context.repo.owner,
                repo: context.repo.repo,
                run_id: ${{ github.event.workflow_run.id }},
@@ -44,7 +44,7 @@ jobs:
             const websiteArtifact = artifacts.data.artifacts.filter((artifact) => {
               return artifact.name == 'website'
             })[0];
-            var download = await github.actions.downloadArtifact({
+            var download = await github.rest.actions.downloadArtifact({
                owner: context.repo.owner,
                repo: context.repo.repo,
                artifact_id: websiteArtifact.id,
@@ -65,11 +65,11 @@ jobs:
           DEPLOY_URL=$(yarn preview:netlify --alias="pr-${PR_NUMBER}" --message="Preview for ${PR_URL}" --json 2> /dev/null |jq -r .deploy_url)
           echo "DEPLOY_URL=${DEPLOY_URL}" >> $GITHUB_ENV
           echo "ISSUE_NUMBER=${PR_NUMBER}" >> $GITHUB_ENV
-      - uses: actions/github-script@v7
+      - uses: actions/github-script@v3
         with:
           github-token: ${{ secrets.GITHUB_TOKEN }}
           script: |
-            github.issues.createComment({
+            github.rest.issues.createComment({
               issue_number: Number(process.env.ISSUE_NUMBER),
               owner: context.repo.owner,
               repo: context.repo.repo,