Unable to run a pipeline with "actions/checkout@(v2/v3)" #92

Closed
opened 2023-04-01 15:42:42 +00:00 by byjunks · 1 comment

Hello,
I tried using act_runner to run some steps to build docker images based on Dockerfiles.
When i run the pipeline with this step, it automatically fails with an error message:

  • name: Checkout code
    uses: actions/checkout@v2

The error message is :

Checkout code 1s
1
OCI runtime exec failed: exec failed: unable to start container process: exec: "node": executable file not found in $PATH: unknown

I tried changing actions/checkout@v2 to actions/checkout@v3 but i still have the error "cannot find: node in PATH".

I tried adding actions/setup-node@v2 but nothing changed.

I run the act runner on an ARM64 system (zsh shell) and just running a unique step with Hello World works. I don't have node installed on my server.

Please find here my pipeline file :

name: Build Dockerfiles

on:
  push:
    branches:
      - main
      
jobs:
  build:
    runs-on: mountain
    steps:
      - name: Set up Node.js
        uses: actions/setup-node@v2
        with:
          node-version: '14'

      - name: Checkout code
        uses: actions/checkout@v2

      - name: Find modified Dockerfiles
        id: modified_dockerfiles
        run: |
          DOCKERFILES=$(git diff --name-only --diff-filter=d HEAD~1 HEAD | grep -E '^.*\/Dockerfile$')
          echo "::set-output name=dockerfiles::$DOCKERFILES"          

      - name: Build Docker Images
        run: |
          DOCKERFILES="${{ steps.modified_dockerfiles.outputs.dockerfiles }}"
          for DOCKERFILE in $DOCKERFILES; do
            IMAGE_NAME=$(basename $(dirname $DOCKERFILE))
            echo "Building $IMAGE_NAME..."
            docker build -t $IMAGE_NAME -f $DOCKERFILE $(dirname $DOCKERFILE)
          done          
Hello, I tried using act_runner to run some steps to build docker images based on Dockerfiles. When i run the pipeline with this step, it automatically fails with an error message: - name: Checkout code uses: actions/checkout@v2 The error message is : Checkout code 1s 1 OCI runtime exec failed: exec failed: unable to start container process: exec: "node": executable file not found in $PATH: unknown I tried changing actions/checkout@v2 to actions/checkout@v3 but i still have the error "cannot find: node in PATH". I tried adding actions/setup-node@v2 but nothing changed. I run the act runner on an ARM64 system (zsh shell) and just running a unique step with Hello World works. I don't have node installed on my server. Please find here my pipeline file : ```yaml name: Build Dockerfiles on: push: branches: - main jobs: build: runs-on: mountain steps: - name: Set up Node.js uses: actions/setup-node@v2 with: node-version: '14' - name: Checkout code uses: actions/checkout@v2 - name: Find modified Dockerfiles id: modified_dockerfiles run: | DOCKERFILES=$(git diff --name-only --diff-filter=d HEAD~1 HEAD | grep -E '^.*\/Dockerfile$') echo "::set-output name=dockerfiles::$DOCKERFILES" - name: Build Docker Images run: | DOCKERFILES="${{ steps.modified_dockerfiles.outputs.dockerfiles }}" for DOCKERFILE in $DOCKERFILES; do IMAGE_NAME=$(basename $(dirname $DOCKERFILE)) echo "Building $IMAGE_NAME..." docker build -t $IMAGE_NAME -f $DOCKERFILE $(dirname $DOCKERFILE) done ```
wolfogre added the
kind
help wanted
label 2023-04-02 14:45:34 +00:00
Owner

Please install node on your containers by yum or apt, or use a image with node installed.

Although this sounds ridiculous, the fact is that it requires node to run actions/setup-node@v2, see a4fcaaf314/action.yml (L36)

Please install node on your containers by `yum` or `apt`, or use a image with node installed. Although this sounds ridiculous, the fact is that it requires node to run `actions/setup-node@v2`, see https://github.com/actions/setup-node/blob/a4fcaaf314b117a40d694a35ee36461f8ff3c6e6/action.yml#L36
wolfogre added the
reviewed
needs feedback
related
environment
labels 2023-04-04 04:16:34 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/act_runner#92
No description provided.