Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

act support please #9

Open
Neos21 opened this issue Jul 24, 2020 · 2 comments
Open

act support please #9

Neos21 opened this issue Jul 24, 2020 · 2 comments

Comments

@Neos21
Copy link

Neos21 commented Jul 24, 2020

I want to use this action with nektos/act.
https://github.com/nektos/act

But when I use act, An error occurred like this.

[FTP/deploy] ⭐  Run Get Changed Files
[FTP/deploy]   ☁  git clone 'https://github.com/jitterbit/get-changed-files' # ref=v1
[FTP/deploy]   🐳  docker cp src=/home/neo/.cache/act/jitterbit-get-changed-files@v1 dst=/actions/
[FTP/deploy]   💬  ::debug::Payload keys: 
| Base commit: undefined
| Head commit: undefined
[FTP/deploy]   ❗  ::error::The base and head commits are missing from the payload for this push event. Please submit an issue on this action's GitHub repo.
[FTP/deploy]   ❗  ::error::Not Found
[FTP/deploy]   ❌  Failure - Get Changed Files
Error: exit with `FAILURE`: 1

Could you fix this problem?

@melvinadmin
Copy link

Did you find any workarounds for this @Neos21 ? Having same issue.

@ChristopherHX
Copy link

This action works fine with act v0.2.26, if you know how to use act.

Sample: use it with this repository and act

git clone https://github.com/jitterbit/get-changed-files

create two local files
event.json, see https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#push for more information about this file.

{
    "before": "a4c73aab1dc616b68807d62d7fc1d1374a87d9fe",
    "after": "d06c756e3609dd3dd5d302dde8d1339af3f790f2"
}

The two values have been taken from a4c73aa and d06c756 of the default branch.
And are creating the following diff a4c73aa...d06c756

changed-files.yaml

on: push
jobs:
  changed-files:
    runs-on: ubuntu-latest
    steps:
    - uses: jitterbit/get-changed-files@v1

Run act

act -s GITHUB_TOKEN -e event.json -W changed-files.yaml -P ubuntu-latest=catthehacker/ubuntu:act-latest

GITHUB_TOKEN is your personal access token of GitHub.
I don't think this was the right repository to ask for help for nektos/act, I guess it worked already with act back in 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants