summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
authorJonatan Rhodin <jonatan.rhodin@mullvad.net>2025-05-07 10:50:47 +0200
committerJonatan Rhodin <jonatan.rhodin@mullvad.net>2025-05-07 12:28:26 +0200
commit8cf1399280f19cd77e9b4935fc69fdac47e9c81e (patch)
tree52a51d9b721e5e681a1de97717d40553f94ad114 /.github/workflows
parent037c264e05cdf4ecaf906c481e57e27484678482 (diff)
downloadmullvadvpn-8cf1399280f19cd77e9b4935fc69fdac47e9c81e.tar.xz
mullvadvpn-8cf1399280f19cd77e9b4935fc69fdac47e9c81e.zip
Use latest commit in PR for reproducible builds
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/android-reproducible-builds.yml5
1 files changed, 3 insertions, 2 deletions
diff --git a/.github/workflows/android-reproducible-builds.yml b/.github/workflows/android-reproducible-builds.yml
index 62855cc42f..f1f7568cc7 100644
--- a/.github/workflows/android-reproducible-builds.yml
+++ b/.github/workflows/android-reproducible-builds.yml
@@ -32,11 +32,12 @@ jobs:
- id: hash
name: Set commit hash or default to github.sha
run: |
- # If the input has a value, it is filled by that value; otherwise, use github.sha
+ # If the input has a value, it is filled by that value; otherwise, fallback to PR sha.
+ # If it is not triggered by a PR, use github.sha.
if [ -n "${{ inputs.commit_hash }}" ]; then
echo "commit_hash=${{ inputs.commit_hash }}" >> "$GITHUB_OUTPUT"
else
- echo "commit_hash=${{ github.sha }}" >> "$GITHUB_OUTPUT"
+ echo "commit_hash=${{ github.event.pull_request.head.sha || github.sha }}" >> "$GITHUB_OUTPUT"
fi
outputs:
COMMIT_HASH: ${{ steps.hash.outputs.commit_hash }}