From a5663d0c3f2644145ead6a7aee50d10d152e5ae4 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Fri, 18 Feb 2022 18:34:37 +0200 Subject: [PATCH] github: Update workflows. * Check commit messages format and length. --- .github/workflows/commit.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/firmware.yml | 14 +++++++------- 2 files changed, 37 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/commit.yml diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml new file mode 100644 index 000000000..30df0e57d --- /dev/null +++ b/.github/workflows/commit.yml @@ -0,0 +1,30 @@ +name: '📜 Check Commit Messages' + +on: + pull_request: + branches: + - 'master' + +jobs: + check-commit-messages: + runs-on: ubuntu-latest + steps: + - name: '📜 Check commit messages format' + uses: gsactions/commit-message-checker@v1 + with: + pattern: '^[^!]+: [A-Za-z]+.+ .+\.$' + flags: 'gm' + error: 'Commit subject line must match the following pattern: : .' + excludeTitle: 'true' + excludeDescription: 'true' + checkAllCommitMessages: 'true' + accessToken: ${{ secrets.GITHUB_TOKEN }} + - name: '📜 Check commit messages length' + uses: gsactions/commit-message-checker@v1 + with: + pattern: '^[^#].{10,78}$' + error: 'Commit subject line maximum line length of 78 characters is exceeded.' + excludeTitle: 'true' + excludeDescription: 'true' + checkAllCommitMessages: 'true' + accessToken: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/firmware.yml b/.github/workflows/firmware.yml index 1c98015f2..ad13fe790 100644 --- a/.github/workflows/firmware.yml +++ b/.github/workflows/firmware.yml @@ -1,4 +1,4 @@ -name: 'Firmware Build 🔥' +name: '🔥 Firmware Build' on: push: @@ -22,7 +22,7 @@ on: - '!**.rst' jobs: - build: + build-firmware: runs-on: ubuntu-20.04 strategy: matrix: @@ -51,8 +51,8 @@ jobs: path: firmware if-no-files-found: error - release: - needs: build + stable-release: + needs: build-firmware runs-on: ubuntu-20.04 if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') steps: @@ -70,7 +70,7 @@ jobs: - name: '📦 Package firmware' run: source tools/ci.sh && ci_package_firmware_release ${{github.ref_name}} - - name: '🔥 Create production release' + - name: '🔥 Create stable release' uses: softprops/action-gh-release@v1 with: draft: true @@ -84,8 +84,8 @@ jobs: name: firmware failOnError: false - development: - needs: build + development-release: + needs: build-firmware runs-on: ubuntu-20.04 if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') == false steps: