Getting "Can't find 'action.yml'" even though the action exists

Getting “Can’t find ‘action.yml’, ‘action.yaml’ or ‘Dockerfile’ under ‘/tmp/github-runner/_actions/ad-m/github-push-action/master’. Did you forget to run actions/checkout before running your local action?” even though the action exists.

[2020-03-14 00:16:29Z INFO StepsRunner] Current state: job state = ''
[2020-03-14 00:16:29Z INFO StepsRunner] Processing step: DisplayName='Push changes'
[2020-03-14 00:16:29Z INFO StepsRunner] Initialize Env context for step
[2020-03-14 00:16:29Z INFO ExpressionManager] Parsing expression: <success()>
[2020-03-14 00:16:29Z INFO ExpressionManager] Evaluating: success()
[2020-03-14 00:16:29Z INFO ExpressionManager] Result: true
[2020-03-14 00:16:29Z INFO StepsRunner] Starting the step.
[2020-03-14 00:16:29Z INFO HostContext] Well known directory 'Bin': '/actions-runner/bin'
[2020-03-14 00:16:29Z INFO HostContext] Well known directory 'Root': '/actions-runner'
[2020-03-14 00:16:29Z INFO HostContext] Well known directory 'Work': '/tmp/github-runner'
[2020-03-14 00:16:29Z INFO HostContext] Well known directory 'Actions': '/tmp/github-runner/_actions'
[2020-03-14 00:16:29Z INFO ActionManager] Load action that reference repository from '/tmp/github-runner/_actions/ad-m/github-push-action/master'
[2020-03-14 00:16:29Z ERR StepsRunner] Caught exception from step: System.NotSupportedException: Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/tmp/github-runner/_actions/ad-m/github-push-action/master'. Did you forget to run actions/checkout before running your local action?
   at GitHub.Runner.Worker.ActionManager.LoadAction(IExecutionContext executionContext, ActionStep action)
   at GitHub.Runner.Worker.ActionRunner.RunAsync()
   at GitHub.Runner.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken)
[2020-03-14 00:16:29Z INFO StepsRunner] Step result: Failed
[2020-03-14 00:16:29Z INFO StepsRunner] Update job result with current step result 'Failed'.
[2020-03-14 00:16:29Z INFO StepsRunner] Current state: job state = 'Failed'

You can find the workflow here:https://github.com/terradatum/github-runner/actions/runs/52817206 - the last run included ACTIONS_STEP_DEBUG.

Here’s the state of the path right now:

[root@github-runner ~]# docker exec github-runner-github-runner ls -alh /tmp/github-runner/_actions/ad-m/github-push-action/master
total 20K
drwxr-xr-x. 3 root root 103 Mar 14 00:16 .
drwxr-xr-x. 3 root root 44 Mar 14 00:16 ..
drwxr-xr-x. 3 root root 23 Mar 14 00:16 .github
-rw-rw-r--. 1 root root 1.1K Feb 3 23:51 LICENSE
-rw-rw-r--. 1 root root 2.1K Feb 3 23:51 README.md
-rw-rw-r--. 1 root root 863 Feb 3 23:51 action.yml
-rw-rw-r--. 1 root root 717 Feb 3 23:51 start.js
-rwxrwxr-x. 1 root root 683 Feb 3 23:51 start.sh

Hi @rbellamy ,

The default branch for action ‘ad-m/github-push-action’ is ‘master’, please specify ‘develop’ branch for the action since it’s not by default.

- name: Push changes
      uses: ad-m/github-push-action@master
      with:
        branch: develop
        github_token: ${{ secrets.GITHUB_TOKEN }}

In addition, from your attached log, it invokes actions from ‘/tmp/github-runner/_actions/ad-m/github-push-action/master’ which exists in docker container, while not on the github runner workspace.

You need to exit the docker and then start your change push.