Skip to content

Actions should report invalid workflow file #23275

@ChristianSch

Description

@ChristianSch

Feature Description

I think it would be very helpful to get an indication in case gitea detected a workflow file but deemed it invalid. Take this workflow file main.yml:

name: Gitea Actions Demo
run-name: ${{ github.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
  Explore-Gitea-Actions:
    runs-on: ubuntu-latest
    steps:
      - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
      - run: echo "GITHUB_API_URL: ${{ GITHUB_API_URL }} GITHUB_SERVER_URL: ${{ GITHUB_SERVER_URL }} github.api_url: ${{ github.api_url }} github.server_url: ${{ github.server_url}}""
      - run: echo "done"

The logs report the following:

2023-03-03 22:38:02 2023/03/03 21:38:02 ...actions/workflows.go:69:DetectWorkflows() [W] ignore invalid workflow "main.yml": yaml: line 9: mapping values are not allowed in this context

But no action is started and no feedback is given to the user. I feel like this belongs in the UI.

PS: The problem with this is the : which aren't allowed.

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/gitea-actionsrelated to the actions of Giteatype/featureCompletely new functionality. Can only be merged if feature freeze is not active.type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions