CI: build tags, publish elf/map, print sha256
What changed, and why it matters
This commit only changes CI/CD pipeline settings. It adds build triggers for version tags, publishes additional build artifacts (ELF and MAP files alongside existing BIN files), prints SHA256 hashes of build outputs, and works around a known GitHub Actions checkout bug by explicitly checking out the current reference. There is no change to the firmware code itself and no apparent security vulnerability.
No security action required. This is a routine CI improvement. Reviewers may optionally verify the actions/checkout workaround does not introduce unintended ref behavior, but it is a documented upstream issue mitigation.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies three files: .github/workflows/ci.yml adds tag-based push triggers for bootloader and firmware tags; .github/workflows/ci-common.yml adds a sha256sum step and expands uploaded artifacts to include .elf and .map files, plus adds a ref: ${{ github.ref }} workaround for actions/checkout issue #1638; scripts/get_version adds a comment warning about the same GitHub Actions checkout behavior. No source code, cryptography, or build logic changes are present.
Changed components
GitHub Actions CI workflowsBuild artifact publishingVersion script documentationInspect captured patch +18 / −1
diff --git a/.github/workflows/ci-common.yml b/.github/workflows/ci-common.yml
index 9458808..cbb972e 100644
--- a/.github/workflows/ci-common.yml
+++ b/.github/workflows/ci-common.yml
@@ -189,6 +189,9 @@ jobs:
- name: Clone the repo
uses: actions/checkout@v4
with:
+ # Github action is broken: https://github.com/actions/checkout/issues/1638
+ # Remove the below line when the issue is resolved
+ ref: ${{ github.ref }}
fetch-depth: 0
fetch-tags: true
submodules: recursive
@@ -203,12 +206,18 @@ jobs:
if: matrix.target == 'firmware' && !cancelled()
run: ./.ci/check-unwanted-symbols
+ - name: Print hashes
+ run: sha256sum build*/bin/*
+
- name: Upload artifact
if: github.event_name == 'push' && !cancelled()
uses: actions/upload-artifact@v4
with:
name: ${{matrix.target}}-${{github.sha}}.bin
- path: build*/bin/*.bin
+ path: |
+ build*/bin/*.bin
+ build*/bin/*.elf
+ build*/bin/*.map
doc:
runs-on: ubuntu-22.04
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b357349..da78fa4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -6,6 +6,10 @@ on:
push:
branches:
- master
+ tags:
+ - bootloader/v*
+ - firmware/v*
+ - firmware-btc-only/v*
jobs:
dev-container:
diff --git a/scripts/get_version b/scripts/get_version
index fe8b889..0c9bf2a 100755
--- a/scripts/get_version
+++ b/scripts/get_version
@@ -7,6 +7,10 @@ We only support annotated tags, you can check the signature with --verify.
NOTE: annotated tags have "taggerdate" and "objecttype==tag"
unannotated tags will have "objecttype==commit" since they are metadataless
+NOTE: If this is called from github action, ensure github action hasn't
+ replaced the tag during checkout:
+ https://github.com/actions/checkout/issues/1638
+
Requires python3.6
"""
Why this scored 12/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.