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

Implement CEDAR Template GitHub Pipeline #102

Open
yancao77 opened this issue Jun 5, 2024 · 1 comment
Open

Implement CEDAR Template GitHub Pipeline #102

yancao77 opened this issue Jun 5, 2024 · 1 comment
Assignees

Comments

@yancao77
Copy link

yancao77 commented Jun 5, 2024

We need to create a GitHub Actions workflow that automates the process of generating and managing CEDAR templates based on a primary template edited in a Google Sheet. After editing, at some point it should be possible to trigger a GitHub workflow in a repo that:

  1. Obtains a copy of the above google sheet as a CSV (there is a way of specifying a URL that can be resolved and the contents downloaded to do this)
  2. Commits the downloaded CSV to the GitHub repo
  3. Generates a CEDAR template, using CEDAR Cli (Yan)
  4. Commits the template to the GitHub repo
  5. Pushes the template to CEDAR
  6. Generates the documentation for the template using CEDAR CLI
  7. Commits the documentation to the gh_pages branch of the repo
  8. Updates the README.md for the repo that points to
    • The GoogleSheet,
    • The CEDAR Template in the Repo,
    • The CEDAR Template in CEDAR
    • The documentation URL
  9. Greate a GitHub release that tags the above
  10. It would excellent if a copy of the sheet could be made (in the Google Workbook) that was read only and was labeled with the semantic version corresponding to the GitHub release. This could be a fair bit of extra work though.
@yancao77 yancao77 self-assigned this Jun 5, 2024
@yancao77
Copy link
Author

The updated workflow is:

  1. Uses CEDAR CLI to generate a CEDAR template, fields, elements, and documentation, and post them to CEDAR.
  2. Copies the generated template to the local repo, named RADxMetadataSpecification.json.
  3. Commits and pushes the template to the repo.
  4. Copies the generated docs to the local repo, named specification.md.
  5. Commits and pushes specification.md to the gh_pages branch of the repo.
  6. Manually triggers GitHub workflow, passing in:
    • Google Sheets ID (optional)
    • Google Sheets tab ID (required)
    • Template folder ID in CEDAR (required)
    • GitHub release version (optional)

Github Action workflow will:

  • Download CSV from Google Sheet.
  • Commit the template CSV to the GitHub repo.
  • Update the README.md for the repo to point to:
    • The Google Sheet
    • The CEDAR Template in the Repo
    • The CEDAR Template in CEDAR
    • The documentation URL
  • Create a GitHub release that tags the above. (if the release version is provided)
  • Make a copy of the sheet (in the Google Workbook) that was read-only and labeled with the semantic version corresponding to the GitHub release. (if the release version is provided)

You can find more details in the GitHub repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant