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

ci: fix schema and markdown generation workflows #1603

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

lfleischmann
Copy link
Member

@lfleischmann lfleischmann commented Aug 29, 2024

Description

  1. Schema generation workflows do not have correct permissions/cannot bypass branch protection rules.
  2. Schema and markdown generation workflows can end in a "race condition" where one workflow pushes to the repository and the other workflow then has a stale main head ref when attempting to push. This fails the workflow.

Implementation

  1. Schema generation workflows no longer attempt to push directly to the main branch but open pull requests using the gh pr create command from the GItHub CLI (is already installed in the Actions runner image).
  2. Because schema generation workflows no longer automatically push to the main branch there are no more race conditions. As for the markdown workflows: a "delay check" was added to the import workflow that uses the gh api command of the GitHub CLI to request running config workflow runs from a GitHub REST API endpoint. If an in_progress run of the config workflow is found, the import workflow will delay its push to the wiki repo by sleeping for some time.

@lfleischmann lfleischmann marked this pull request as ready for review August 29, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

1 participant