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

Website JSON schema for .doctrine-project.json #55

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

SenseException
Copy link
Member

To make changes in the .doctrine-project.json files simpler I've created a JSON schema for it. The current problem is the sharing of the schema-file in the workflows of the other repositories. They need to download website-schema.json in their workflows to be able to run it against their website config file.
Downloading files from GitHub seem to need a token and GITHUB_TOKEN can't be used between repositories of an organisation. My suggestion would be to move the schema to doctrine/doctrine-website. Or does anyone have another suggestion?

@SenseException SenseException added enhancement New feature or request question Further information is requested labels Nov 20, 2024
@SenseException
Copy link
Member Author

@greg0ire Thanks for your first feedback. Any suggestions about where to put the schema file what I described earlier?

@greg0ire
Copy link
Member

I don't have anything better to suggest than hosting it on www.doctrine-project.org. It's probably what makes the most sense.

@greg0ire
Copy link
Member

Actually, since it's only 3kB, you could also store it as an org-wide variable: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#limits-for-configuration-variables

@SenseException
Copy link
Member Author

I've decided to put the schema on the website because it's more transparent/visible and everyone can create PRs to improve it. Cons are that changes to the schema have to be done in doctrine/doctrine-website and the dependency to a reachable website.

@SenseException SenseException marked this pull request as ready for review December 7, 2024 22:34
@SenseException SenseException removed the question Further information is requested label Dec 10, 2024
@greg0ire
Copy link
Member

Please also add an example under https://github.com/doctrine/.github/tree/main/workflow-templates

.github/workflows/website-schema.yml Outdated Show resolved Hide resolved
.github/workflows/website-schema.yml Outdated Show resolved Hide resolved
@greg0ire
Copy link
Member

Also, please open a proof PR, a bit like this one: https://github.com/doctrine/collections/pull/344/files

@greg0ire
Copy link
Member

@SenseException I made the proof PR: doctrine/collections#438 :)

@SenseException
Copy link
Member Author

@greg0ire I created doctrine/orm#11763 😅

@greg0ire
Copy link
Member

greg0ire commented Dec 10, 2024

Yes, and it doesn't work, for the reason I mentioned above 😉

So you just need to address that and it will work.

@SenseException
Copy link
Member Author

It didn't work despite having it in the workflow paths. I converted it into a draft for now and reuse it as a regular introduction of the workflow later.

@greg0ire
Copy link
Member

Looks great! Can you please squash the commits into one?

Create json schema for website config

Outsource website-schema.json to doctrine website

Use long option in commands

Run workflow on Ubuntu 24.04

Create website-schema template
@greg0ire greg0ire merged commit 297a674 into doctrine:main Dec 10, 2024
@greg0ire
Copy link
Member

Thank you! Let me tag this rightaway!

@SenseException
Copy link
Member Author

Tagged with 7.1.0

@SenseException SenseException deleted the website-schema branch December 10, 2024 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants