Unable To Use [pre-entrypoint,entrypoint,post-entrypoint] in action.yml

After reading the docs @ https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/metadata-syntax-for-github-actions#pre-entrypoint

I tried to use pre-entrypoint & entrypoint in my github action but i keep getting error like below

docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "entrypoint2.sh": executable file not found in $PATH: unknown.

My current action.yml looks like below

name: 'Action Test'
description: ""
author: "varunsridharan"
  using: 'docker'
  image: 'docker://ghcr.io/varunsridharan/actions-alpine-php:latest'
  entrypoint: 'entrypoint2.sh'

There are a number of things that could be causing this:

  • The entrypoint2.sh script is missing from the Docker image
  • The entrypoint2.sh script is not marked as executable (use chmod a+x to change that)
  • The path to entrypoint2.sh is missing in the entrypoint: parameter. Without specifying a full path the script must be in one of the directories listed in $PATH. For example, if the script is in the root of the container image, you’d need to use:
  entrypoint: '/entrypoint2.sh'