Skip to content

Commit

Permalink
Add basic Github Actions to the Blackbox Tools
Browse files Browse the repository at this point in the history
  • Loading branch information
McGiverGim committed Jun 8, 2023
1 parent 439a993 commit d2cfbe5
Show file tree
Hide file tree
Showing 9 changed files with 125 additions and 39 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/artifact-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Artifact links comments creator
on:
workflow_run:
workflows: ["PR"]
types: [completed]

jobs:
artifacts-url-comments:
name: Add artifact links to PR and issues
runs-on: ubuntu-22.04
steps:
- name: Get information about the original PR
uses: potiuk/get-workflow-origin@v1_5
id: get-info
with:
token: ${{ secrets.GITHUB_TOKEN }}
sourceRunId: ${{ github.event.workflow_run.id }}
- name: Add artifact links to PR and issues
uses: tonyhallett/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
prefix: "**Do you want to test this code? Here you have an automated build:**"
suffix: "_**WARNING:** It may be unstable. Use only for testing!_"
format: name
addTo: pull
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
workflow_call:

jobs:
build:
name: Build (${{ matrix.name }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: Linux
os: ubuntu-22.04

- name: macOS
os: macos-11

steps:
- uses: actions/checkout@v3

- name: Build the tools
run: make all

- name: Publish build artifacts
uses: actions/upload-artifact@v3
with:
name: Blackbox tools artifacts ${{matrix.name}}
path: obj/*
retention-days: 60
16 changes: 16 additions & 0 deletions .github/workflows/hide-artifact-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Hide artifact links comments

on:
pull_request_target:
types: [synchronize, reopened]

jobs:
hide-artifacts-link-comments:
name: Hide artifact links
runs-on: ubuntu-22.04
steps:
- name: Hide comments
uses: int128/hide-comment-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
starts-with: "**Do you want to test this code? Here you have an automated build:**"
10 changes: 10 additions & 0 deletions .github/workflows/manual-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Manual Build
run-name: Manual Build ${{ github.ref_name }}

on:
workflow_dispatch:

jobs:
ci:
name: CI
uses: ./.github/workflows/ci.yml
11 changes: 11 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Nightly

on:
push:
branches:
- master

jobs:
ci:
name: CI
uses: ./.github/workflows/ci.yml
17 changes: 17 additions & 0 deletions .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: No Response

on:
issue_comment:
types: [created]
schedule:
- cron: 0 4 * * *

jobs:
no-response:
runs-on: ubuntu-latest
steps:
- uses: lee-dohm/no-response@9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb # v0.5.0
with:
daysUntilClose: 1
responseRequiredLabel: Missing Information
token: ${{ github.token }}
12 changes: 12 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: PR

on:
pull_request:
branches:
- master
- '*-maintenance'

jobs:
ci:
name: CI
uses: ./.github/workflows/ci.yml
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Blackbox flight data recorder tools

[![Build](https://img.shields.io/github/actions/workflow/status/betaflight/blackbox-tools/nightly.yml?branch=master)](https://github.com/betaflight/blackbox-tools/actions/workflows/nightly.yml) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)


![Rendered flight log frame](screenshots/blackbox-screenshot-1.jpg)

## Introduction
Expand Down

0 comments on commit d2cfbe5

Please sign in to comment.