mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix(ci): ensure release SHA is passed correctly and validate inputs (#4411)
This commit is contained in:
parent
2c8eaf8f5d
commit
7d35f6e4a7
2 changed files with 13 additions and 0 deletions
|
|
@ -261,6 +261,9 @@ jobs:
|
|||
SHA=$(git rev-parse $TAG_TO_PROCESS)
|
||||
fi
|
||||
|
||||
# Trim whitespace to ensure clean output
|
||||
SHA=$(echo "$SHA" | xargs)
|
||||
|
||||
echo "Debug: Resolved SHA: '$SHA'"
|
||||
|
||||
if [ -z "$SHA" ]; then
|
||||
|
|
|
|||
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
|
|
@ -73,6 +73,16 @@ jobs:
|
|||
GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }}
|
||||
GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }}
|
||||
steps:
|
||||
- name: Debug and Validate Inputs
|
||||
run: |
|
||||
echo "Debug: Tag Name: ${{ inputs.tag_name }}"
|
||||
echo "Debug: Commit SHA: ${{ inputs.commit_sha }}"
|
||||
|
||||
if [ -z "${{ inputs.commit_sha }}" ] && [ "${{ inputs.channel }}" == "internal" ]; then
|
||||
echo "::error::Internal release requires commit_sha because the tag does not exist yet."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue