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: on:
push: push:
@ -22,7 +22,7 @@ on:
- '!**.rst' - '!**.rst'
jobs: jobs:
build: build-firmware:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
strategy: strategy:
matrix: matrix:
@ -51,8 +51,8 @@ jobs:
path: firmware path: firmware
if-no-files-found: error if-no-files-found: error
release: stable-release:
needs: build needs: build-firmware
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps: steps:
@ -70,7 +70,7 @@ jobs:
- name: '📦 Package firmware' - name: '📦 Package firmware'
run: source tools/ci.sh && ci_package_firmware_release ${{github.ref_name}} 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 uses: softprops/action-gh-release@v1
with: with:
draft: true draft: true
@ -84,8 +84,8 @@ jobs:
name: firmware name: firmware
failOnError: false failOnError: false
development: development-release:
needs: build needs: build-firmware
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') == false if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') == false
steps: steps: