From 41ece652733feb01e89ca1bbd258fa6df0fea74e Mon Sep 17 00:00:00 2001 From: Runchao Han Date: Thu, 10 Oct 2024 15:49:24 +1100 Subject: [PATCH] init --- .github/workflows/backport.yml | 38 ++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 8 +++++-- .github/workflows/goreleaser.yml | 11 +++++++++ .github/workflows/publish.yml | 4 ++-- CHANGELOG.md | 38 ++++++++++++++++++++++++++++++++ 5 files changed, 95 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/backport.yml create mode 100644 .github/workflows/goreleaser.yml create mode 100644 CHANGELOG.md diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 0000000..47c9985 --- /dev/null +++ b/.github/workflows/backport.yml @@ -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 }} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 756881f..c5c614f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: jobs: lint_test: - uses: babylonlabs-io/.github/.github/workflows/reusable_go_lint_test.yml@v0.6.0 + uses: babylonlabs-io/.github/.github/workflows/reusable_go_lint_test.yml@v0.7.0 with: run-unit-tests: true run-integration-tests: true @@ -16,8 +16,12 @@ jobs: run-gosec: true gosec-args: "-exclude-generated -exclude-dir=itest -exclude-dir=testutil ./..." + changelog_reminder: + uses: babylonlabs-io/.github/.github/workflows/reusable_changelog_reminder.yml@v0.7.0 + secrets: inherit + docker_pipeline: - uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.6.0 + uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.7.0 secrets: inherit with: publish: false diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml new file mode 100644 index 0000000..7e304dc --- /dev/null +++ b/.github/workflows/goreleaser.yml @@ -0,0 +1,11 @@ +name: goreleaser + +on: + push: + tags: + - '*' + +jobs: + release: + uses: babylonlabs-io/.github/.github/workflows/reusable_go_releaser.yml@v0.7.0 + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 74a64aa..777e4ad 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,7 +9,7 @@ on: jobs: lint_test: - uses: babylonlabs-io/.github/.github/workflows/reusable_go_lint_test.yml@v0.6.0 + uses: babylonlabs-io/.github/.github/workflows/reusable_go_lint_test.yml@v0.7.0 with: run-unit-tests: true run-integration-tests: true @@ -20,7 +20,7 @@ jobs: docker_pipeline: needs: ["lint_test"] - uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.6.0 + uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.7.0 secrets: inherit with: publish: true diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..5af09fa --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,38 @@ + + +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) + +## Unreleased