Skip to content

Commit 7b04427

Browse files
authored
Merge pull request #13 from dihm/build_workflow
Add docker build workflow
2 parents 606fdc2 + 5316044 commit 7b04427

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/build.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build firmware
2+
3+
on:
4+
push:
5+
tags:
6+
- '[0-9]+\.[0-9]+\.[0-9]+*'
7+
pull_request:
8+
types: [opened, reopened, synchronize, ready_for_review]
9+
10+
jobs:
11+
build-firmware:
12+
runs-on: ubuntu-latest
13+
name: Build firmware
14+
steps:
15+
- name: Check out this repository
16+
uses: actions/checkout@v4
17+
18+
- name: Build Docker image
19+
run: docker compose build --pull --build-arg APT_MIRROR="http://azure.archive.ubuntu.com/ubuntu/"
20+
21+
- name: Run docker container
22+
run: docker compose up
23+
24+
- name: Upload firmware as artifact
25+
uses: actions/upload-artifact@v4
26+
with:
27+
name: prawnblaster-firmware-${{ github.sha }}
28+
path: build/prawn_do/prawn_do.uf2
29+
30+
- name: Create release
31+
if: (github.event_name == 'push' && contains(github.ref, '/tags'))
32+
uses: "marvinpinto/action-automatic-releases@latest"
33+
with:
34+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
35+
prerelease: false
36+
files: |
37+
LICENSE.txt
38+
build/prawn_do/prawn_do.uf2

0 commit comments

Comments
 (0)