在Gitea中运行Actions demo时,遇到node报错

错误信息

node[39]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb9c1f0 node::Abort() [node]
 2: 0xb9c26e  [node]
 3: 0xc0a39e  [node]
 4: 0xc0a481 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
 5: 0xb58213 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [node]
 6: 0xb5886b node::Start(int, char**) [node]
 7: 0x7f61740991ca  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7f617409928b __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xad779e _start [node]

解决办法

  1. 在action_runner的config.yml中增加node镜像
labels:
  - "ubuntu-latest:docker://gitea/runner-images:ubuntu-latest"
  - "ubuntu-22.04:docker://gitea/runner-images:ubuntu-22.04"
  - "ubuntu-20.04:docker://gitea/runner-images:ubuntu-20.04"
  # 新增
  - "node-slim:docker://node:16-bullseye-slim"
  1. 使用node镜像执行Checkout
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions
on: [push]

jobs:
  Explore-Gitea-Actions:
    #runs-on: ubuntu-latest
    runs-on: node-slim
    steps:
      - run: echo "The job was automatically triggered by a ${{ gitea.event_name }} event."
      - run: echo "This job is now running on a ${{ runner.os }} server hosted by Gitea!"
      - run: echo "The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
      - name: Check out repository code
        uses: https://gitea.com/actions/checkout@v4
      - run: echo "The ${{ gitea.repository }} repository has been cloned to the runner."
      - run: echo "The workflow is now ready to test your code on the runner."
      - name: List files in the repository
        run: |
          ls ${{ gitea.workspace }}
      - run: echo "This job's status is ${{ job.status }}."
posted @ 2025-01-16 15:33  GoXXIV  阅读(176)  评论(0)    收藏  举报