Merge pull request #1545 from openmv/workflows_update

github: Update workflows.
This commit is contained in:
Ibrahim Abdelkader 2022-02-18 19:11:54 +02:00 committed by GitHub
commit 47ddb9c1b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 7 deletions

30
.github/workflows/commit.yml vendored Normal file
View File

@ -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: <scope>: <description>.'
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 }}

View File

@ -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: