mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
feat: add the runner validate subcommand (#757)
<!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - features - [PR](https://code.forgejo.org/forgejo/runner/pulls/757): <!--number 757 --><!--line 0 --><!--description ZmVhdDogdGhlIG5ldyBgZm9yZ2Vqby1ydW5uZXIgdmFsaWRhdGVgIGNvbW1hbmQgY2FuIGJlIHVzZWQgdG8gdmVyaWZ5IGlmIGFuIGFjdGlvbiBvciBhIHdvcmtmbG93IGlzIGNvbmZvcm1hbnQgd2l0aCB0aGUgZXhwZWN0ZWQgc2NoZW1hLiBgZm9yZ2Vqby1ydW5uZXIgdmFsaWRhdGUgLS1yZXBvc2l0b3J5IGh0dHBzOi8vZXhhbXBsZS5jb20vbXkvcmVwb3NpdG9yeWAgd2lsbCB2YWxpZGF0ZSBhbGwgdGhlIHdvcmtmbG93cyBhbmQgYWN0aW9ucyBhIEdpdCByZXBvc2l0b3J5IGNvbnRhaW5zLiBBbHRlcm5hdGl2ZWx5ICBgZm9yZ2Vqby1ydW5uZXIgdmFsaWRhdGUgLS1wYXRoIG15YWN0aW9uL2FjdGlvbi55bWwgLS1hY3Rpb25gIG9yIGBmb3JnZWpvLXJ1bm5lciB2YWxpZGF0ZSAtLXBhdGggLmZvcmdlam8vd29ya2Zsb3dzL3Rlc3QueW1sIC0td29ya2Zsb3dgIGNhbiBiZSB1c2VkIHRvIHZhbGlkYXRlIGEgc2luZ2xlIGZpbGUuIEl0IGlzIHJlY29tbWVuZGVkIHRvIHVzZSB0aGVzZSBjb21tYW5kcyB0byB2ZXJpZnkgZXhpc3RpbmcgYWN0aW9ucyBhbmQgd29ya2Zsb3dzIHBhc3MgYmVmb3JlIHVwZ3JhZGluZyB0byBbRm9yZ2VqbyBydW5uZXIgdjguMC4wXShodHRwczovL2NvZGUuZm9yZ2Vqby5vcmcvZm9yZ2Vqby9ydW5uZXIvc3JjL2JyYW5jaC9tYWluL1JFTEVBU0UtTk9URVMubWQjOC0wLTApIG9yIGFib3ZlIHRvIG5vdCBkaXNydXB0IGV4aXN0aW5nIHdvcmtmbG93cy4=-->feat: the new `forgejo-runner validate` command can be used to verify if an action or a workflow is conformant with the expected schema. `forgejo-runner validate --repository https://example.com/my/repository` will validate all the workflows and actions a Git repository contains. Alternatively `forgejo-runner validate --path myaction/action.yml --action` or `forgejo-runner validate --path .forgejo/workflows/test.yml --workflow` can be used to validate a single file. It is recommended to use these commands to verify existing actions and workflows pass before upgrading to [Forgejo runner v8.0.0](https://code.forgejo.org/forgejo/runner/src/branch/main/RELEASE-NOTES.md#8-0-0) or above to not disrupt existing workflows.<!--description--> <!--end release-notes-assistant--> Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/757 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org>
This commit is contained in:
parent
86c528e510
commit
20f115fdac
40 changed files with 545 additions and 8 deletions
BIN
internal/app/cmd/testdata/validate/good-repository/objects/62/6b6b892539d8c81545a5af6bac1b9996335e4d
vendored
Normal file
BIN
internal/app/cmd/testdata/validate/good-repository/objects/62/6b6b892539d8c81545a5af6bac1b9996335e4d
vendored
Normal file
Binary file not shown.
BIN
internal/app/cmd/testdata/validate/good-repository/objects/74/22baa3a822e909afe3c87eaa7646b12f43fdcb
vendored
Normal file
BIN
internal/app/cmd/testdata/validate/good-repository/objects/74/22baa3a822e909afe3c87eaa7646b12f43fdcb
vendored
Normal file
Binary file not shown.
BIN
internal/app/cmd/testdata/validate/good-repository/objects/80/2c1a243fbadbedf725ae695d7a37be1748eb2d
vendored
Normal file
BIN
internal/app/cmd/testdata/validate/good-repository/objects/80/2c1a243fbadbedf725ae695d7a37be1748eb2d
vendored
Normal file
Binary file not shown.
BIN
internal/app/cmd/testdata/validate/good-repository/objects/ba/e251227a079a7601f20554eb82b3cefcce51c9
vendored
Normal file
BIN
internal/app/cmd/testdata/validate/good-repository/objects/ba/e251227a079a7601f20554eb82b3cefcce51c9
vendored
Normal file
Binary file not shown.
BIN
internal/app/cmd/testdata/validate/good-repository/objects/cb/66d230ae7d2c6ca2132b0996cffd8c74de48b1
vendored
Normal file
BIN
internal/app/cmd/testdata/validate/good-repository/objects/cb/66d230ae7d2c6ca2132b0996cffd8c74de48b1
vendored
Normal file
Binary file not shown.
BIN
internal/app/cmd/testdata/validate/good-repository/objects/ce/2b2747739d1553c23a48e695732c358faccfaf
vendored
Normal file
BIN
internal/app/cmd/testdata/validate/good-repository/objects/ce/2b2747739d1553c23a48e695732c358faccfaf
vendored
Normal file
Binary file not shown.
BIN
internal/app/cmd/testdata/validate/good-repository/objects/ef/dc13fcbbc43a196903b12847fca66d3c6b8d9d
vendored
Normal file
BIN
internal/app/cmd/testdata/validate/good-repository/objects/ef/dc13fcbbc43a196903b12847fca66d3c6b8d9d
vendored
Normal file
Binary file not shown.
BIN
internal/app/cmd/testdata/validate/good-repository/objects/f0/9a73e2ddef7b7834661e4c7b388a22f654f164
vendored
Normal file
BIN
internal/app/cmd/testdata/validate/good-repository/objects/f0/9a73e2ddef7b7834661e4c7b388a22f654f164
vendored
Normal file
Binary file not shown.
BIN
internal/app/cmd/testdata/validate/good-repository/objects/f1/8ebc1e1151d0b8de9c296f1d8baf9c90fe3fa6
vendored
Normal file
BIN
internal/app/cmd/testdata/validate/good-repository/objects/f1/8ebc1e1151d0b8de9c296f1d8baf9c90fe3fa6
vendored
Normal file
Binary file not shown.
BIN
internal/app/cmd/testdata/validate/good-repository/objects/f4/2c3901e0beb480edfd5d41670c1a1958d5b33c
vendored
Normal file
BIN
internal/app/cmd/testdata/validate/good-repository/objects/f4/2c3901e0beb480edfd5d41670c1a1958d5b33c
vendored
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue