google / gcp_scanner

A comprehensive scanner for Google Cloud
Apache License 2.0
305 stars 94 forks source link

ci: Enable versioning #100

Closed sumit-158 closed 1 year ago

sumit-158 commented 1 year ago

Description

Fix

google-cla[bot] commented 1 year ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

mshudrak commented 1 year ago

We also need to update PR name to better reflect what we are doing here.

sumit-158 commented 1 year ago

Have you tested this workflow in your own repository?

Yes, here (It just test repository)

Could you also customize names and make release only when certain tag is pushed (we want tag-based release schema).

You mean "changelog-types" in my latest commit.

mshudrak commented 1 year ago

Have you tested this workflow in your own repository?

Yes, here (It just test repository)

Could you also customize names and make release only when certain tag is pushed (we want tag-based release schema).

You mean "changelog-types" in my latest commit.

  • we can change "release-type" to python currently it is simple.
  • Also, we have to "Allow GitHub Actions to create and approve pull requests" (If we haven't already) in "Actions permission"

As far as I understand, we create new release on every push commit, right? This is redundant, we would prefer to have some "mechanism" to tell release-action to create release only for certain commits (e.g. commit with certain tag or may be to certain branch). I'd encourage you to think about the best strategy here.

sumit-158 commented 1 year ago

As far as I understand, we create new release on every push commit, right?

No, exactly It just creates a new Pr with contains all previous commits rather than continuously releasing what's landed on the main branch, release-please maintains Release PR, If we have to create a new release then we just have to merge release-please PR! These Release PR are kept up-to-date as additional work is merged. When we are ready to tag a release, simply merge the release PR. ref: https://github.com/marketplace/actions/release-please-action#whats-a-release-pr eg in my repo: https://github.com/sumit-158/release-please-action/pull/8

@mshudrak

mshudrak commented 1 year ago

@sumit-158 I see, thanks for the link. How often does it generate those PRs? Is that literally for each commit with conventional message?

sumit-158 commented 1 year ago

How often does it generate those PRs?

Every time we merge the pr and any new push commit happenes.

Is that literally for each commit with conventional message?

Yes, those which are mentioned in changelog-type.

mshudrak commented 1 year ago

Ok, let me think about that solution and PR #98. I am a bit skeptical having extra PR on almost every push we make...

sumit-158 commented 1 year ago

Sure @mshudrak , Just putting It won't create extra PR for every single push it's just a single PR that will keep track of almost every Push...

mshudrak commented 1 year ago

Ok, let's try this one.