diff --git a/.github/pr-title-checker-config.json b/.github/pr-title-checker-config.json index f3646fdd..0d6efe71 100644 --- a/.github/pr-title-checker-config.json +++ b/.github/pr-title-checker-config.json @@ -4,9 +4,7 @@ "color": "B60205" }, "CHECKS": { - "regexp": "^(feat|fix|test|refactor|chore|style|docs|perf|build|ci|revert)(\\(.*\\))?\\!?:.*", - "ignoreLabels": [ - "ignore-title" - ] + "regexp": "^(feat|fix|test|refactor|chore|style|docs|perf|build|ci|revert)(!)?(\\(.*\\))?:.*", + "ignoreLabels" : ["ignore-title"] } } diff --git a/.github/workflows/dev-build.yaml b/.github/workflows/dev-build.yaml index f5099ab6..1b6611cf 100644 --- a/.github/workflows/dev-build.yaml +++ b/.github/workflows/dev-build.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: GreptimeDB Operator Development Build +name: dev-build on: workflow_dispatch: # Allows you to run this workflow manually. @@ -22,8 +22,8 @@ on: required: false default: GreptimeTeam/greptimedb-operator commit: # Note: We only pull the source code and use the current workflow to build the artifacts. - description: The commit to build - required: true + description: The commit to build, default to the latest commit in the current branch. + required: false env: GO_VERSION: "1.21" @@ -31,6 +31,8 @@ env: # The source code will check out in the following path: '${WORKING_DIR}/dev/greptimedb-operator'. CHECKOUT_SOURCE_PATH: dev/greptimedb-operator + COMMIT: ${{ inputs.commit || github.sha }} + jobs: docker: name: build-images @@ -45,7 +47,7 @@ jobs: uses: actions/checkout@v4 with: repository: ${{ inputs.repository }} - ref: ${{ inputs.commit }} + ref: ${{ env.COMMIT }} path: ${{ env.CHECKOUT_SOURCE_PATH }} - name: Set up QEMU @@ -80,7 +82,7 @@ jobs: - name: Configure tag shell: bash run: | - VERSION="dev-$(date "+%Y%m%d-%s")-$(echo "${{ inputs.commit }}" | cut -c1-8)" + VERSION="dev-$(date "+%Y%m%d-%s")-$(echo "${{ env.COMMIT }}" | cut -c1-8)" echo "VERSION=${VERSION}" >> $GITHUB_ENV - name: Build and push operator diff --git a/.github/workflows/ci.yaml b/.github/workflows/develop.yaml similarity index 95% rename from .github/workflows/ci.yaml rename to .github/workflows/develop.yaml index 0ace436e..7d23d98b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/develop.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: CI +name: develop on: pull_request: @@ -55,14 +55,17 @@ jobs: go-version: ${{ env.GO_VERSION }} - name: Check code generation + shell: bash run: | make check-code-generation - name: Compile the project + shell: bash run: | make - name: Make lint + shell: bash run: | make lint @@ -79,6 +82,7 @@ jobs: go-version: ${{ env.GO_VERSION }} - name: Run the unit tests + shell: bash run: | make test @@ -96,5 +100,6 @@ jobs: - name: Run e2e id: e2e + shell: bash run: | make e2e diff --git a/.github/workflows/pr-title-checker.yaml b/.github/workflows/pr-title-checker.yaml index 7c7851c9..e9c5f879 100644 --- a/.github/workflows/pr-title-checker.yaml +++ b/.github/workflows/pr-title-checker.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: PR Title Checker +name: check-pr-title on: pull_request_target: @@ -27,7 +27,7 @@ jobs: check: runs-on: ubuntu-22.04 steps: - - uses: thehanimo/pr-title-checker@v1.3.4 + - uses: thehanimo/pr-title-checker@v1.4.1 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} pass_on_octokit_error: false diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b731d2ab..2e56bcf9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: Release +name: release on: push: @@ -63,7 +63,6 @@ jobs: shell: bash run: | VERSION=${{ github.ref_name }} - echo "VERSION=${VERSION:1}" >> $GITHUB_ENV - name: Build and push operator uses: docker/build-push-action@v5 @@ -106,7 +105,7 @@ jobs: cp ./config/crd/resources/greptime.io_greptimedbstandalones.yaml ./greptimedbstandalones.yaml - name: Publish release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: name: "Release ${{ github.ref_name }}" files: |