Skip to content

Commit

Permalink
Create manual action
Browse files Browse the repository at this point in the history
  • Loading branch information
CameronBeneteau committed Dec 2, 2024
1 parent 4fff6a4 commit 6e0bc5d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: Build, Test, and Deploy Project

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

jobs:
build:
Expand All @@ -29,12 +32,18 @@ jobs:
path: firmware/build/${{ github.event.inputs.project }}/${{ github.event.inputs.platform }}

deploy:
runs-on: ubuntu-latest
runs-on: self-hosted
needs: build
environment: deploy
steps:

- name: Sanitize project name
id: sanitize
run: |
run: echo "::set-output name=project_name::${GITHUB_EVENT_INPUTS_PROJECT//\//-}"
- 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 }}
name: build-artifact-${{ steps.sanitize.outputs.project_name }}-${{ github.event.inputs.platform }}

0 comments on commit 6e0bc5d

Please sign in to comment.