Skip to content

Commit

Permalink
ci: GH actions for goreleaser, changelog reminder, and backport (#75)
Browse files Browse the repository at this point in the history
Also bumped .github dependency
  • Loading branch information
SebastianElvis authored Oct 10, 2024
1 parent feeb4e3 commit 005d902
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 283 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/backport.yml
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 }}
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
11 changes: 11 additions & 0 deletions .github/workflows/goreleaser.yml
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,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'
Expand All @@ -23,7 +23,7 @@ jobs:
docker_pipeline:
needs: ["lint_test"]
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: true
Loading

0 comments on commit 005d902

Please sign in to comment.