[PR #2416] [MERGED] feat: Validate GitHub Actions schema #2434

Closed
opened 2026-03-01 21:55:26 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/2416
Author: @ChristopherHX
Created: 8/4/2024
Status: Merged
Merged: 8/13/2024
Merged by: @mergify[bot]

Base: masterHead: act-schema


📝 Commits (9)

📊 Changes

12 files changed (+2854 additions, -67 deletions)

View changed files

📝 go.mod (+2 -2)
📝 go.sum (+6 -0)
📝 pkg/model/action.go (+13 -0)
📝 pkg/model/workflow.go (+13 -0)
📝 pkg/model/workflow_test.go (+2 -9)
📝 pkg/runner/runner_test.go (+15 -11)
📝 pkg/runner/testdata/local-action-via-composite-dockerfile/action/action.yml (+44 -44)
📝 pkg/runner/testdata/local-action-via-composite-dockerfile/push.yml (+1 -1)
📝 pkg/runner/testdata/local-remote-action-overrides/config/config.yml (+0 -0)
pkg/schema/action_schema.json (+261 -0)
pkg/schema/schema.go (+387 -0)
pkg/schema/workflow_schema.json (+2110 -0)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/2416 **Author:** [@ChristopherHX](https://github.com/ChristopherHX) **Created:** 8/4/2024 **Status:** ✅ Merged **Merged:** 8/13/2024 **Merged by:** [@mergify[bot]](https://github.com/apps/mergify) **Base:** `master` ← **Head:** `act-schema` --- ### 📝 Commits (9) - [`6331e33`](https://github.com/nektos/act/commit/6331e3398b0207660457a68e625062686e267b84) feat: Validate GitHub Actions schema - [`3a64608`](https://github.com/nektos/act/commit/3a6460892f117c8c9073bbcf9c263746192f711a) update code - [`62eeda2`](https://github.com/nektos/act/commit/62eeda293cbcaad609d9524b73f1d41774f4d1dc) fix tests - [`20b46ce`](https://github.com/nektos/act/commit/20b46ceff50e93c1786c9d92e25d4a1d2604909d) Bump docker / fix lint - [`11af188`](https://github.com/nektos/act/commit/11af188053c9f13b2bd141d12432c7a96c11d579) fix test action due to moving the file - [`169ec57`](https://github.com/nektos/act/commit/169ec578045f73aef7619aefcb05ce6307d448b3) remove unused function - [`eaec642`](https://github.com/nektos/act/commit/eaec642e83c403479a33df4d214340aec33363b9) fix parsing additional functions - [`3e86085`](https://github.com/nektos/act/commit/3e86085e16e4afee441d7442fdb78999b6f2958a) fix allow int - [`1bb2cf3`](https://github.com/nektos/act/commit/1bb2cf355e21622b934824503d322ce66b04602f) update docker dep, due to linter ### 📊 Changes **12 files changed** (+2854 additions, -67 deletions) <details> <summary>View changed files</summary> 📝 `go.mod` (+2 -2) 📝 `go.sum` (+6 -0) 📝 `pkg/model/action.go` (+13 -0) 📝 `pkg/model/workflow.go` (+13 -0) 📝 `pkg/model/workflow_test.go` (+2 -9) 📝 `pkg/runner/runner_test.go` (+15 -11) 📝 `pkg/runner/testdata/local-action-via-composite-dockerfile/action/action.yml` (+44 -44) 📝 `pkg/runner/testdata/local-action-via-composite-dockerfile/push.yml` (+1 -1) 📝 `pkg/runner/testdata/local-remote-action-overrides/config/config.yml` (+0 -0) ➕ `pkg/schema/action_schema.json` (+261 -0) ➕ `pkg/schema/schema.go` (+387 -0) ➕ `pkg/schema/workflow_schema.json` (+2110 -0) </details> ### 📄 Description 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:55:26 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#2434
No description provided.