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

yikun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 40086cb9b21 [SPARK-40860][INFRA] Change `set-output` to `GITHUB_EVENT`
40086cb9b21 is described below

commit 40086cb9b21fe207242c4928d8e2cc3e756d61da
Author: Yikun Jiang <[email protected]>
AuthorDate: Fri Oct 21 11:06:33 2022 +0800

    [SPARK-40860][INFRA] Change `set-output` to `GITHUB_EVENT`
    
    ### What changes were proposed in this pull request?
    Change `set-output` to `GITHUB_OUTPUT`.
    
    ### Why are the changes needed?
    The `set-output` command is deprecated and will be disabled soon. Please 
upgrade to using Environment Files. For more information see: 
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
    
    ### Does this PR introduce _any_ user-facing change?
    No, dev only
    
    ### How was this patch tested?
    - CI passed
    - Also do a local test on benchmark: 
https://github.com/Yikun/spark/actions/runs/3294384181/jobs/5431945626
    
    Closes #38323 from Yikun/set-output.
    
    Authored-by: Yikun Jiang <[email protected]>
    Signed-off-by: Yikun Jiang <[email protected]>
---
 .github/workflows/benchmark.yml      |  2 +-
 .github/workflows/build_and_test.yml | 13 ++++++-------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml
index 5508227b8b2..f73267a95fa 100644
--- a/.github/workflows/benchmark.yml
+++ b/.github/workflows/benchmark.yml
@@ -54,7 +54,7 @@ jobs:
     steps:
     - name: Generate matrix
       id: set-matrix
-      run: echo "::set-output name=matrix::["`seq -s, 1 
$SPARK_BENCHMARK_NUM_SPLITS`"]"
+      run: echo "matrix=["`seq -s, 1 $SPARK_BENCHMARK_NUM_SPLITS`"]" >> 
$GITHUB_OUTPUT
 
   # Any TPC-DS related updates on this job need to be applied to tpcds-1g job 
of build_and_test.yml as well
   tpcds-1g-gen:
diff --git a/.github/workflows/build_and_test.yml 
b/.github/workflows/build_and_test.yml
index e0adad54aed..f9b445e9bbd 100644
--- a/.github/workflows/build_and_test.yml
+++ b/.github/workflows/build_and_test.yml
@@ -103,16 +103,15 @@ jobs:
               \"k8s-integration-tests\" : \"true\",
             }"
           echo $precondition # For debugging
-          # GitHub Actions set-output doesn't take newlines
-          # 
https://github.community/t/set-output-truncates-multiline-strings/16852/3
-          precondition="${precondition//$'\n'/'%0A'}"
-          echo "::set-output name=required::$precondition"
+          # Remove `\n` to avoid "Invalid format" error
+          precondition="${precondition//$'\n'/}}"
+          echo "required=$precondition" >> $GITHUB_OUTPUT
         else
           # This is usually set by scheduled jobs.
           precondition='${{ inputs.jobs }}'
           echo $precondition # For debugging
-          precondition="${precondition//$'\n'/'%0A'}"
-          echo "::set-output name=required::$precondition"
+          precondition="${precondition//$'\n'/}"
+          echo "required=$precondition" >> $GITHUB_OUTPUT
         fi
     - name: Generate infra image URL
       id: infra-image-outputs
@@ -121,7 +120,7 @@ jobs:
         REPO_OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' 
'[:lower:]')
         IMG_NAME="apache-spark-ci-image:${{ inputs.branch }}-${{ github.run_id 
}}"
         IMG_URL="ghcr.io/$REPO_OWNER/$IMG_NAME"
-        echo ::set-output name=image_url::$IMG_URL
+        echo "image_url=$IMG_URL" >> $GITHUB_OUTPUT
 
   # Build: build Spark and run the tests for specified modules.
   build:


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to