Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Github中的操作_Github_Github Actions - Fatal编程技术网

Github中的操作

Github中的操作,github,github-actions,Github,Github Actions,怎么了,为什么我会出错 错误:进程已完成,退出代码为123 它可能是xargs返回123,因为grep返回时带有退出代码1-125。如果任何命令返回非零退出代码,GitHub操作将停止执行脚本 xargs手册页: xargs以以下状态退出: […] 123如果任何命令调用以状态1-125退出 //# This is a basic workflow to help you get started with Actions name: CI //# Controls when the act

怎么了,为什么我会出错

错误:进程已完成,退出代码为123



它可能是
xargs
返回123,因为grep返回时带有退出代码1-125。如果任何命令返回非零退出代码,GitHub操作将停止执行脚本

xargs手册页:

xargs以以下状态退出:
[…]
123如果任何命令调用以状态1-125退出

//# This is a basic workflow to help you get started with Actions

name: CI

//# Controls when the action will run. Triggers the workflow on push or pull request
//# events but only for the main branch

on:

  pull_request:

    branches:
      - "**"
    paths:
     - '**.js'        
//# A workflow run is made up of one or more jobs that can run sequentially or in parallel

jobs:

  build:

    //# The type of runner that the job will run on

    runs-on: ubuntu-latest

    //# Steps represent a sequence of tasks that will be executed as part of the job

    steps:

      //# Runs a single command using the runners shell

      - name: Check for Debugger string in js files
        run: |
          find . -type f -print0 | xargs -0 grep -l "Debugger" > answer.txt
          filesize=$(stat -c%s answer.txt)
          if (( filesize > 0 )); then
             exit 1
          else
             exit 0            
          fi