cosmo
cosmo copied to clipboard
chore: adjust helm chart release-please to cosmo-repo
trafficstars
Motivation and Context
This brings together the release-please action as follwoing:
- For pushing against the OCR a PAT is used with the following permissions: repo, workflow, write:packages
For reference this secret:
registry-password: ${{ secrets.GH_TOKEN_HELM_RELEASES }}
should have the above mentioned permissions
- For disabling some checks on the release branches something like the follwing is used:
- name: Check if git is not dirty after generating files
if: "(github.event_name == 'push' && !startsWith(github.ref, 'refs/heads/release-please--')) || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'release-please--'))"
This is done to still satisfy the branch checks. Simply skipping the whole job brings prs in unmergables states, as these checks will never be triggered and can't succeed or fail.
Atm, only the relevant step is conditional to avoid sprinkle if over each step.
- The update Chart Version push might fail due to multiple running release-prs in parallel (e.g. cosmo-router or cosmo aka cosmo-platform) releases4.
This job can safely be retriggered and will e.g. retrigger whenever someone adds something to the release (by merging a branch with a conventional-commit formatted commit) to the main branch.
- The repository might need access to the packages: see: connecting-a-repository-to-a-user-scoped-package-on-github
The whole release process can be tested and adjusted here:
- cosmo-clone
- cosmo-clone-packages - not sure if this can be opened see "pakages in the code tab of the repo"
- cosmo-clone-releases
TODO
- [x] Tests or benchmark included
- [ ] Documentation is changed or added on https://app.gitbook.com/
- [x] PR title must follow conventional-commit-standard