cosmo icon indicating copy to clipboard operation
cosmo copied to clipboard

chore: adjust helm chart release-please to cosmo-repo

Open AndreasZeissner opened this issue 1 year ago • 0 comments
trafficstars

Motivation and Context

This brings together the release-please action as follwoing:

  1. 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

  1. 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.

  1. 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.

  1. 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:

TODO

AndreasZeissner avatar Aug 10 '24 20:08 AndreasZeissner