main: sync workflows main -> dev -> vX.Y-dev use sync branches #5010
+41
−12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes
The structure of the spec version development branches intentionally differs from the structure of the
main
branch. In addition to the files inmain
the development branches containsrc
foldertests
folderAll files except those in the
src
andtests
folders should be identical betweenmain
and the development branches, and are regularly synced frommain
->dev
->vX.Y-dev
.Merging a spec release into
main
with its full history makes subsequent the subsequent sync frommain
->dev
->vX.Y-dev
a bit more challenging than simply creating a PR merging the head branch into the base branch (which is what we did until now).A sync that preserves the intentionally different structure of the base branch needs to perform these steps:
src/*
andtests/*
files from base branch - these are the only intended structural differencesThis PR updates the two sync workflows to automatically perform these steps.
The workflows have been tested in fork https://github.com/ralfhandl/OpenAPI-Specification, both with an "initial" sync of a spec release from
main
->dev
->vX.Y-dev
and with subsequent syncs of changes to files inmain
outside of the two special folderssrc
andtest
:Release syncs:
Non-release syncs: