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

Gitea fails to process test task in laconic-sdk #26

Closed
dboreham opened this issue Mar 28, 2023 · 2 comments
Closed

Gitea fails to process test task in laconic-sdk #26

dboreham opened this issue Mar 28, 2023 · 2 comments
Assignees

Comments

@dboreham
Copy link
Collaborator

Migrated the laconic-sdk repo and made a PR to test Actions.
Nothing runs. In Gitea log I see:

2023/03/28 14:17:05 ...actions/workflows.go:71:DetectWorkflows() [W] ignore invalid workflow "test.yml": unknown on type: <nil>

The action runs on GitHub:

image

@telackey
Copy link
Contributor

There appear to be a be a bug in nektos/act (or at least gitea's fork of it) which does not process the YAML of an on specification correctly when there are no child nodes, eg:

on:
  pull_request:
  push:
    branches:
      - main
      - release/**

Specifically, the error was here, because v is nil in this instance: https://gitea.com/gitea/act/src/commit/929ea6df751b98f399498d35bb1c68f4e6c15e14/pkg/jobparser/model.go#L166

But it looks like it was fixed a few days ago: https://gitea.com/gitea/act/commit/3daf3132057d33bee325857b016a60db332fd050

In my local testing, I was able to make it happy by adding a types child, but interestingly when running in gitea (and I tried both 1.19 and the latest 1.20.0 dev build, which I hoped would have the latest act, but it doesn't seem like it is quite up to date yet) the only thing to satisfy it was to add a branches child.

In the meantime, a fairly simple workaround is to change it to:

on:
  pull_request:
    branches:
      - '*'
  push:
    branches:
      - main
      - release/**

@telackey
Copy link
Contributor

I opened a PR with the fix: cerc-io/laconic-sdk#38

It now runs, but fails because it cannot checkout laconicd (which makes sense, as I don't have it in my gitea, nor have I given it a GitHub token to get it from there).

Screenshot 2023-03-29 at 3 58 59 PM

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

2 participants