Namespace protobufs & use Trunk

This commit is contained in:
Sacha Weatherstone 2023-01-17 21:03:10 +10:00
parent 1326e9e1bf
commit d7f485f9c5
No known key found for this signature in database
GPG key ID: 7AB2D7E206124B31
41 changed files with 217 additions and 147 deletions

View file

@ -1,6 +1,6 @@
<!-- Describe what you are intending to change -->
## What does this PR do?
# What does this PR do?
<!-- Please remove or replace the issue url -->

View file

@ -1,73 +1,12 @@
name: "CI"
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
name: pull-request
on: pull_request
jobs:
lint:
if: ${{ github.event_name != 'workflow_dispatch' }}
build:
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@v3
- name: run protolint
uses: plexsystems/protolint-action@v0.2.0
with:
configDirectory: .
release:
if: ${{ github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Cache python libs
uses: actions/cache@v3
id: cache-pip # needed in if test
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
- name: Upgrade python tools
shell: bash
run: |
python -m pip install --upgrade pip
- name: Get release version string
run: echo "version=$(./scripts/buildinfo.py short)" >> $GITHUB_OUTPUT
id: version
- name: Create release
uses: actions/create-release@v1
id: create_release
with:
release_name: Meshtastic Protobufs ${{ steps.version.outputs.version }}
tag_name: v${{ steps.version.outputs.version }}
body: Protobufs for version ${{ steps.version.outputs.version }} release of Meshtastic firmware
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Bump version.properties
run: >-
scripts/bump_version.py
- name: Create version.properties pull request
uses: peter-evans/create-pull-request@v3
with:
add-paths: |
version.properties
- uses: actions/checkout@v2
- uses: bufbuild/buf-setup-action@v1
- uses: bufbuild/buf-lint-action@v1
- uses: bufbuild/buf-breaking-action@v1
with:
against: "https://github.com/${GITHUB_REPOSITORY}.git#branch=master"

72
.github/workflows/create_release.yml vendored Normal file
View file

@ -0,0 +1,72 @@
name: "CI"
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
lint:
if: ${{ github.event_name != 'workflow_dispatch' }}
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@v3
- name: run protolint
uses: plexsystems/protolint-action@v0.2.0
with:
configDirectory: .
release:
if: ${{ github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Cache python libs
uses: actions/cache@v3
id: cache-pip # needed in if test
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
- name: Upgrade python tools
shell: bash
run: |
python -m pip install --upgrade pip
- name: Get release version string
run: echo "version=$(./scripts/buildinfo.py short)" >> $GITHUB_OUTPUT
id: version
- name: Create release
uses: actions/create-release@v1
id: create_release
with:
release_name: Meshtastic Protobufs ${{ steps.version.outputs.version }}
tag_name: v${{ steps.version.outputs.version }}
body: Protobufs for version ${{ steps.version.outputs.version }} release of Meshtastic firmware
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Bump version.properties
run: >-
scripts/bump_version.py
- name: Create version.properties pull request
uses: peter-evans/create-pull-request@v3
with:
add-paths: |
version.properties

19
.github/workflows/nightly.yml vendored Normal file
View file

@ -0,0 +1,19 @@
name: Nightly
on:
schedule:
- cron: 0 8 * * 1-5
workflow_dispatch: {}
jobs:
trunk_check:
name: Trunk Check Upload
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Trunk Check
uses: trunk-io/trunk-action@v1
with:
trunk-token: ${{ secrets.TRUNK_TOKEN }}

View file

@ -1,19 +0,0 @@
name: Update docs
on:
push:
branches:
- master
jobs:
update-docs:
environment: Production
runs-on: ubuntu-latest
steps:
- name: Update Docs
uses: benc-uk/workflow-dispatch@v1
with:
workflow: "Update protobufs"
repo: meshtastic/meshtastic
token: ${{ secrets.ACCESS_TOKEN }}