-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: Validate GitHub Actions schema #2416
Conversation
**BREAKING** previously accepted workflows are now invalid
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
@ChristopherHX this pull request has failed checks 🛠 |
@ChristopherHX this pull request has failed checks 🛠 |
Thanks for mentioning me. I'll keep an eye on this PR. Don't worry, although there could be some challenges for the Gitea's fork, I believe we can find a way to handle them. So please feel free to do what you think is right. 👍 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2416 +/- ##
===========================================
+ Coverage 61.56% 76.59% +15.03%
===========================================
Files 53 62 +9
Lines 9002 8157 -845
===========================================
+ Hits 5542 6248 +706
+ Misses 3020 1343 -1677
- Partials 440 566 +126 ☔ View full report in Codecov by Sentry. |
The error messages might be cryptic here, but this should be the minimal viable variant of a schema check without additional complexity for producing better errors Somehow I managed to fix the errors reported by CI here. Actually disabling this schema check to get more time in a fork should be straight forward, by removeing UnmarshallYAML in two places Sources of the schemas |
@focusaurus please review this change to the validation. Something like this will no longer parse - uses:
run: - null on: whatever and a lot more like - uses: myrepo@${{ github.ref }}
- run: ${{ gitlab.test }} expressions are checked ahead of time like in actions/runner parser. |
@ChristopherHX this pull request has failed checks 🛠 |
This looks really interesting! I have had cases were I was happy writing Github Actions/workflows with |
Resolves #2414
BREAKING previously accepted workflows are now invalid
@wolfogre you would need to add context gitea everywhere github is in the context array in your fork if this would be merged
I'm not shure if Gitea Actions has labeled some behavior allowed without schema as features.
Moreover Singleworlflows are more likely to be rejected after this change.
TBD add tests that serialized workflows from model can be parsed again, e.g. the Container structure used to contain additional fields that are invalid per schema
As draft to see which test is invalid as well