-
Notifications
You must be signed in to change notification settings - Fork 2
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
ci: GH actions for goreleaser, changelog reminder, and backport #75
Merged
+85
−283
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Adapted from https://github.com/marketplace/actions/backporting | ||
# | ||
# Usage: | ||
# - Let's say you want to backport a pull request on a branch named `production`. | ||
# - Then label it with `backport production`. | ||
# - That's it! When the pull request gets merged, it will be backported to | ||
# the `production` branch. If the pull request cannot be backported, a comment | ||
# explaining why will automatically be posted. | ||
# | ||
# Note: multiple backport labels can be added. For example, if a pull request | ||
# has the labels `backport staging` and `backport production` it will be | ||
# backported to both branches: `staging` and `production`. | ||
name: Backport | ||
on: | ||
pull_request_target: | ||
types: | ||
- closed | ||
- labeled | ||
|
||
jobs: | ||
backport: | ||
name: Backport | ||
runs-on: ubuntu-latest | ||
# Only react to merged PRs for security reasons. | ||
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target. | ||
if: > | ||
github.event.pull_request.merged | ||
&& ( | ||
github.event.action == 'closed' | ||
|| ( | ||
github.event.action == 'labeled' | ||
&& contains(github.event.label.name, 'backport') | ||
) | ||
) | ||
steps: | ||
- uses: tibdex/backport@v2 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ on: | |
|
||
jobs: | ||
lint_test: | ||
uses: babylonlabs-io/.github/.github/workflows/reusable_go_lint_test.yml@v0.3.1 | ||
uses: babylonlabs-io/.github/.github/workflows/reusable_go_lint_test.yml@v0.7.0 | ||
with: | ||
go-version: '1.23' | ||
go-lint-version: 'v1.60.2' | ||
|
@@ -18,8 +18,12 @@ jobs: | |
sudo apt-get update | ||
sudo apt-get install -y libzmq3-dev | ||
|
||
changelog_reminder: | ||
uses: babylonlabs-io/.github/.github/workflows/[email protected] | ||
secrets: inherit | ||
|
||
docker_pipeline: | ||
uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.3.1 | ||
uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.7.0 | ||
secrets: inherit | ||
with: | ||
publish: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
release: | ||
uses: babylonlabs-io/.github/.github/workflows/[email protected] | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should each repo owner add .goreleaser.yml to the root of the project? How does the gh action know to build our binaries otherwise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm good question. This workflow does not upload binaries at the moment. To this end one needs to add stuff like https://github.com/marketplace/actions/goreleaser-action#upload-artifacts to the template. Can do in subsequent PRs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I think it's also not building them either (how do we check it?), it needs something like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/babylonlabs-io/pm/issues/78
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the current workflow is just creating a release corresponding to the tagged version. To fix this one needs to first call
make build
, and then add a step in the workflow like this to upload the binary. Or add a yml file like this. Need some research there