Skip to content

Commit

Permalink
Create workflow dispatch action
Browse files Browse the repository at this point in the history
  • Loading branch information
CameronBeneteau committed Dec 2, 2024
1 parent e39e694 commit 4fff6a4
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build, Test, and Deploy Project

on:
workflow_dispatch:
inputs:
project:
description: 'Project to build (i.e. Demo/Blink)'
required: true
platform:
description: 'Platform to build for (i.e. cli, stm32f767)'
required: true

jobs:
build:
runs-on: self-hosted
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Build ${{ github.event.inputs.project }} for ${{ github.event.inputs.platform }}
run: |
cd firmware
make PROJECT=${{ github.event.inputs.project }} PLATFORM=${{ github.event.inputs.platform }} build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifact-${{ github.event.inputs.project }}-${{ github.event.inputs.platform }}
path: firmware/build/${{ github.event.inputs.project }}/${{ github.event.inputs.platform }}

deploy:
runs-on: ubuntu-latest
needs: build
environment: deploy
steps:
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: firmware/build/${{ github.event.inputs.project }}/${{ github.event.inputs.platform }}
name: build-artifact-${{ github.event.inputs.project }}-${{ github.event.inputs.platform }}
2 changes: 1 addition & 1 deletion .github/workflows/test-self-hosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: |
cd firmware
make PROJECT=${{ matrix.project }} PLATFORM=${{ matrix.platform }} build
# - name: Upload artifacts
# uses: actions/upload-artifact@v4
# with:
Expand Down

0 comments on commit 4fff6a4

Please sign in to comment.