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

Automate release process for ospo-actions #78

Closed
ahpook opened this issue Mar 19, 2024 · 10 comments
Closed

Automate release process for ospo-actions #78

ahpook opened this issue Mar 19, 2024 · 10 comments
Assignees
Labels
batch How We Work work item type: 2 week or less long effort. ospo-actions Issues relating to the OSPO Actions

Comments

@ahpook
Copy link
Contributor

ahpook commented Mar 19, 2024

Current:

  • PR is created
  • Maintainer labels PR so it gets categorized for release
  • PR is reviewed, approved and merged into base branch
  • GitHub Action creates release draft
  • Maintainer validates draft and publishes release (and added to discussion Announcements)
  • Maintainer locally creates GitHub Action image, tags it (latest, vX, vX.X.X) and pushes it to ghcr.io

Desired:

  • PR is created
  • GitHub Action to validate label present fails
  • Maintainer labels PR so it gets categorized in release
  • GitHub Action to validate label present passes
  • PR is reviewed, approved and merged into base branch
  • Release automatically created (and added to discussion Announcements)
  • GitHub Action container image created, tagged (latest, vX, vX.X.X) and pushed to ghcr.io
@ahpook ahpook moved this to Backlog in GitHub OSPO OSS Board Mar 19, 2024
@ahpook ahpook added the ospo-actions Issues relating to the OSPO Actions label Mar 19, 2024
@jmeridth jmeridth self-assigned this Mar 29, 2024
@jmeridth
Copy link
Member

jmeridth commented Apr 1, 2024

@zkoppert/@ahpook before I fill out the description above, does this issue mean we will automate releases when PRs merge or is release management still manual? If automated, I'd like to introduce an issue and pull request to require PRs have labels so that they are categorized in the release. If we automate and don't do that, then some PRs will be uncategorized (accidentally).

If this is just about automating the Action container images and releases are still manual, then I can write the description up that way.

Both paths I will summarize the GitHub Action I plan to create to handle the image creation and pushing after a release.

Thank you.

@zkoppert
Copy link
Member

zkoppert commented Apr 1, 2024

Personally, I'd prefer it to be fully automated meaning automate a release each time a PR is merged to main. Requiring one of the labels in our set of supported labels would be great!

@jmeridth
Copy link
Member

jmeridth commented Apr 1, 2024

Personally, I'd prefer it to be fully automated meaning automate a release each time a PR is merged to main. Requiring one of the labels in our set of supported labels would be great!

Awesome. Thank you. Will get description updated and ask for feedback.

@jmeridth
Copy link
Member

jmeridth commented Apr 2, 2024

Thinking about this more last night, I'd very much be a fan of using the amannn/action-semantic-pull-request GitHub action to force PR titles (adhering to conventional commits), this GHA uses the conventional-commit-types npm package that has the following prefixes available

  • feat
  • fix
  • docs
  • style
  • refactor
  • perf
  • test
  • build
  • ci
  • chore
  • revert

We can then use the Auto Labeler feature of the pre-releaser GHA to use regex based on the PR prefixes to auto label the PRs.

A side benefit is that, as a maintainer, you can look at the repo's pull requests and easily see what type they are based on the prefix and the auto labelling.

Full disclosure: we use this for argo-helm in the argoproj org. It works well. There can be a little frustration by first-time contributors on how to get the titles correct, but our error messaging gave clarity to help them.

@jmeridth
Copy link
Member

jmeridth commented Apr 2, 2024

The pre-releaser GitHub Action can still be used. It has a boolean publish GHA variable we can set to true to automatically publish the release. No draft step.

@zkoppert
Copy link
Member

zkoppert commented Apr 2, 2024

If we are adding friction for first time contributors lets just make sure we spell everything out in our contributing docs and continue to be responsive in issues and PRs. Sounds like a great plan!

@jmeridth jmeridth moved this from Backlog to In progress in GitHub OSPO OSS Board Apr 2, 2024
@lumaxis
Copy link

lumaxis commented Apr 4, 2024

A nice aspect of PR titles imo is that they can also be adjusted by maintainers of a repo i.e. us, so we can help/"just fix it" for contributors if they get it wrong and don't necessarily have to go through a back and forth cycle with them.

@jmeridth jmeridth added the batch How We Work work item type: 2 week or less long effort. label Apr 4, 2024
@lelia
Copy link

lelia commented Apr 5, 2024

If we are adding friction for first time contributors lets just make sure we spell everything out in our contributing docs and continue to be responsive in issues and PRs. Sounds like a great plan!

+1 to this take. I'm a big fan of keeping things labeled / organized, but those standards will need to be clearly articulated in the docs and perhaps some hints added to the PR / Issue templates directly, in case contributors skip the README / CONTRIBUTORS.md 🙂

jmeridth added a commit to github/contributors that referenced this issue Apr 23, 2024
Part of github/github-ospo#78

- [x] lint pr title adhering to conventional commits (helps with auto labelling)
  - [x] Update CONTRIBUTING.md
    - [x] automated releases
    - [x] how to file a bug report
    - [x] how to file an enhancement
  - [x] Update pull_request_template with new standard
- [x] setup autolabelling through release-drafter github action config
- [x] create auto-labeler workflow
- [x] change release-drafter workflow to release
  - [x] create release, including new tag
  - [x] create discussion announcement based on release
  - [x] build container images, tag them and release them

Manual Actions:

- [x] create `revert` and `maintenance` labels
- [x] put repository and category IDs into secrets for the discussion create action

Signed-off-by: jmeridth <[email protected]>
jmeridth added a commit to github/contributors that referenced this issue Apr 23, 2024
Part of github/github-ospo#78

- [x] lint pr title adhering to conventional commits (helps with auto labelling)
  - [x] Update CONTRIBUTING.md
    - [x] automated releases
    - [x] how to file a bug report
    - [x] how to file an enhancement
  - [x] Update pull_request_template with new standard
- [x] setup autolabelling through release-drafter github action config
- [x] create auto-labeler workflow
- [x] change release-drafter workflow to release
  - [x] create release, including new tag
  - [x] create discussion announcement based on release
  - [x] build container images, tag them and release them

Manual Actions:

- [x] create `revert` and `maintenance` labels
- [x] put repository and category IDs into secrets for the discussion create action

Signed-off-by: jmeridth <[email protected]>
jmeridth added a commit to github/contributors that referenced this issue Apr 23, 2024
Part of github/github-ospo#78

- [x] lint pr title adhering to conventional commits (helps with auto labelling)
  - [x] Update CONTRIBUTING.md
    - [x] automated releases
    - [x] how to file a bug report
    - [x] how to file an enhancement
  - [x] Update pull_request_template with new standard
- [x] setup autolabelling through release-drafter github action config
- [x] create auto-labeler workflow
- [x] change release-drafter workflow to release
  - [x] create release, including new tag
  - [x] create discussion announcement based on release
  - [x] build container images, tag them and release them

Manual Actions:

- [x] create `revert` and `maintenance` labels
- [x] put repository and category IDs into secrets for the discussion create action

Signed-off-by: jmeridth <[email protected]>
jmeridth added a commit to github/contributors that referenced this issue Apr 23, 2024
Part of github/github-ospo#78

- [x] lint pr title adhering to conventional commits (helps with auto labelling)
  - [x] Update CONTRIBUTING.md
    - [x] automated releases
    - [x] how to file a bug report
    - [x] how to file an enhancement
  - [x] Update pull_request_template with new standard
- [x] setup autolabelling through release-drafter github action config
- [x] create auto-labeler workflow
- [x] change release-drafter workflow to release
  - [x] create release, including new tag
  - [x] create discussion announcement based on release
  - [x] build container images, tag them and release them

Manual Actions:

- [x] create `revert` and `maintenance` labels
- [x] put repository and category IDs into secrets for the discussion create action

Signed-off-by: jmeridth <[email protected]>
jmeridth added a commit to github/contributors that referenced this issue Apr 23, 2024
Part of github/github-ospo#78

- [x] lint pr title adhering to conventional commits (helps with auto labelling)
  - [x] Update CONTRIBUTING.md
    - [x] automated releases
    - [x] how to file a bug report
    - [x] how to file an enhancement
  - [x] Update pull_request_template with new standard
- [x] setup autolabelling through release-drafter github action config
- [x] create auto-labeler workflow
- [x] change release-drafter workflow to release
  - [x] create release, including new tag
  - [x] create discussion announcement based on release
  - [x] build container images, tag them and release them

Manual Actions:

- [x] create `revert` and `maintenance` labels
- [x] put repository and category IDs into secrets for the discussion create action

Signed-off-by: jmeridth <[email protected]>
jmeridth added a commit to github/evergreen that referenced this issue Apr 23, 2024
Part of github/github-ospo#78

- [x] lint pr title adhering to conventional commits (helps with auto labelling)
  - [x] Update CONTRIBUTING.md
    - [x] automated releases
    - [x] how to file a bug report
    - [x] how to file an enhancement
  - [x] Update pull_request_template with new standard
- [x] setup autolabelling through release-drafter github action config
- [x] create auto-labeler workflow
- [x] change release-drafter workflow to release
  - [x] create release, including new tag
  - [x] create discussion announcement based on release
  - [x] build container images, tag them and release them

Manual Actions:

- [x] create `revert` and `maintenance` labels
- [x] put repository and category IDs into secrets for the discussion create action

Signed-off-by: jmeridth <[email protected]>
jmeridth added a commit to github/automatic-contrib-prs that referenced this issue Apr 23, 2024
Part of github/github-ospo#78

- [x] lint pr title adhering to conventional commits (helps with auto labelling)
  - [x] Update CONTRIBUTING.md
    - [x] automated releases
    - [x] how to file a bug report
    - [x] how to file an enhancement
  - [x] Update pull_request_template with new standard
- [x] setup autolabelling through release-drafter github action config
- [x] create auto-labeler workflow
- [x] change release-drafter workflow to release
  - [x] create release, including new tag
  - [x] create discussion announcement based on release
  - [x] build container images, tag them and release them

Manual Actions:

- [x] create `revert` and `maintenance` labels
- [x] put repository and category IDs into secrets for the discussion create action

Signed-off-by: jmeridth <[email protected]>
jmeridth added a commit to github/evergreen that referenced this issue Apr 23, 2024
Part of github/github-ospo#78

- [x] lint pr title adhering to conventional commits (helps with auto labelling)
  - [x] Update CONTRIBUTING.md
    - [x] automated releases
    - [x] how to file a bug report
    - [x] how to file an enhancement
  - [x] Update pull_request_template with new standard
- [x] setup autolabelling through release-drafter github action config
- [x] create auto-labeler workflow
- [x] change release-drafter workflow to release
  - [x] create release, including new tag
  - [x] create discussion announcement based on release
  - [x] build container images, tag them and release them

Manual Actions:

- [x] create `revert` and `maintenance` labels
- [x] put repository and category IDs into secrets for the discussion create action

Signed-off-by: jmeridth <[email protected]>
@jmeridth jmeridth moved this from In progress to Done in GitHub OSPO OSS Board Apr 23, 2024
@jmeridth
Copy link
Member

This is complete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
batch How We Work work item type: 2 week or less long effort. ospo-actions Issues relating to the OSPO Actions
Projects
Status: Done
Development

No branches or pull requests

5 participants