Github中的操作
怎么了,为什么我会出错 错误:进程已完成,退出代码为123Github中的操作,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
它可能是
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