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

feat: add automated release and labelling #52

Merged
merged 2 commits into from
Apr 17, 2024
Merged

Conversation

jmeridth
Copy link
Member

@jmeridth jmeridth commented Apr 15, 2024

Part of github/github-ospo#78

Pull Request

Proposed Changes

  • introduce PR title conventional commits requirement
  • document this in the CONTRIBUTING.md
  • add auto labelling workflow and configuration
    • Split from release-drafter since they each are enacted at different times
      • auto-labeler: PR events
      • release-drafter: merge to default branch (main)
  • build, tag and push new action container images (latest, vX, vX.X.X)
  • add packages: write permissions to action

We might have a chicken&egg problem where .github/auto-labeler.yml has to be on the default branch before it can be found. I tested this in another personal repo and had that arise.

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • run make lint and fix any issues that you have introduced
  • run make test and ensure you have test coverage for the lines you are introducing

Reviewer

  • Label as either bug, documentation, enhancement, infrastructure, or breaking

@jmeridth jmeridth self-assigned this Apr 15, 2024
@jmeridth jmeridth requested a review from zkoppert as a code owner April 15, 2024 16:02
@jmeridth
Copy link
Member Author

Yep. It happened. The .github/auto-labeler.yml needs to be on the default branch. failure

- [x] introduce PR title conventional commits requirement
- [x] document this in the CONTRIBUTING.md
- [x] add auto labelling workflow and configuration
  - Split from release-drafter since they each are enacted at different times
    - auto-labeler: PR events
    - release-drafter: merge to main

Signed-off-by: jmeridth <[email protected]>
Co-authored-by: Zack Koppert <[email protected]>
Copy link
Member

@zkoppert zkoppert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏷️ and 🤖 , wohoo!

@jmeridth jmeridth marked this pull request as draft April 16, 2024 06:11
@jmeridth jmeridth marked this pull request as ready for review April 17, 2024 17:31
@jmeridth jmeridth requested a review from zkoppert April 17, 2024 17:31
run: |
short-tag=$(echo ${{ steps.release-drafter.outputs.tag_name }} | cut -d. -f1)
echo "SHORT_TAG=$short-tag" >> $GITHUB_OUTPUT
create_action_images:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zkoppert this is the new image build and deploy stuff, utilizing the tags generated by release-drafter

uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who would github.actor be in this case? github-actions?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe so, yes.

@jmeridth jmeridth merged commit f6f2abb into main Apr 17, 2024
21 of 22 checks passed
@jmeridth jmeridth deleted the jm-automated-releases branch April 17, 2024 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants