-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AyabAsync v1.1.3 #209
Draft
jpcornil-git
wants to merge
9
commits into
AllYarnsAreBeautiful:main
Choose a base branch
from
jpcornil-git:Share
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
AyabAsync v1.1.3 #209
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3533d16
Update archive_build.yml
jpcornil-git 6c8b128
Upload artifact from ayabAsync v1.1.1
jpcornil-git 2e38900
Update archive_build.yml
jpcornil-git d7f83ed
Update archive_build.yml
jpcornil-git f4c7ab0
Update to v1.1.2
jpcornil-git ac56aa6
v1.1.2
jpcornil-git 0842508
v1.1.3
jpcornil-git ece5793
Update to actions/upload-artifact@v4 to remove warnings
jpcornil-git bd178c6
Merge branch 'main' into Share
jpcornil-git File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -4,17 +4,10 @@ jobs: | |
archive: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo and submodules | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
- name: Build Firmware | ||
uses: ./.github/actions/build | ||
with: | ||
BUILD_WRAPPER_OUT_DIR: build_wrapper_out_dir | ||
- name: Fetch binary | ||
run: wget https://github.com/jpcornil-git/ayabAsync-firmware/releases/download/v1.1.0/firmware_uno_1_1_0.hex | ||
- name: Archive build | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{format('{0}-{1}',github.sha,github.run_number)}} | ||
path: build/*.hex | ||
path: ./*.hex | ||
Comment on lines
29
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Verify hex file existence before archiving. The workflow might succeed even if the hex file wasn't downloaded successfully. Add a verification step: + - name: Verify hex file
+ run: |
+ if [ ! -f ./*.hex ]; then
+ echo "Error: No hex file found"
+ exit 1
+ fi
- name: Archive build
uses: actions/upload-artifact@v3
with:
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add error handling for wget command.
The wget command lacks error handling which could lead to silent failures.
Implement proper error handling:
📝 Committable suggestion
🛠️ Refactor suggestion
Use environment variables or GitHub Actions inputs for version number.
The version number (v1.1.0) is hardcoded in the URL, making it difficult to maintain and update.
Consider this improvement:
Add checksum verification for the downloaded binary.
Downloading binaries without verification poses a security risk. Consider adding SHA256/SHA512 checksum validation.
Here's a suggested implementation:
- name: Fetch binary run: | wget https://github.com/jpcornil-git/ayabAsync-firmware/releases/download/v1.1.0/firmware_uno_1_1_0.hex + echo "expected_sha256_hash firmware_uno_1_1_0.hex" | sha256sum --check
Please replace
expected_sha256_hash
with the actual SHA256 hash of the firmware file.