-
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from AxxAxx/dev
Dev
- Loading branch information
Showing
2 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Build Main | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build Docker image | ||
run: cd AxxSolder_firmware && docker build -t firmware-builder -f Containerfile . | ||
|
||
- name: Set firmware path | ||
run: echo "FIRMWARE_PATH=AxxSolder-${GITHUB_REF#refs/tags/}.bin" >> $GITHUB_ENV | ||
|
||
- name: Run firmware build and copy artifact | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
cd AxxSolder_firmware | ||
docker run --rm \ | ||
-v ${{ github.workspace }}:/workspace \ | ||
-w /workspace \ | ||
firmware-builder \ | ||
cp /app/build/AxxSolder.bin /workspace/${FIRMWARE_PATH} | ||
- name: Upload firmware artifact | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: firmware | ||
path: ${{ env.FIRMWARE_PATH }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters