mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #1545 from openmv/workflows_update
github: Update workflows.
This commit is contained in:
commit
47ddb9c1b9
30
.github/workflows/commit.yml
vendored
Normal file
30
.github/workflows/commit.yml
vendored
Normal 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 }}
|
||||||
14
.github/workflows/firmware.yml
vendored
14
.github/workflows/firmware.yml
vendored
@ -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:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user