mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-06-05 20:51:53 -07:00
CI: Rebuild everything if Cargo.lock, dist/ or scripts/ changes
See https://github.com/EFForg/rayhunter/pull/1020
This commit is contained in:
committed by
Brad Warren
parent
768d5c877e
commit
c4eca245b9
@@ -42,11 +42,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
lcommit=${{ github.event.pull_request.base.sha || 'origin/main' }}
|
lcommit=${{ github.event.pull_request.base.sha || 'origin/main' }}
|
||||||
|
|
||||||
# If we are on main, if workflow/cargo config files changed, or if
|
# We rebuild everything if any of these conditions hold:
|
||||||
# the latest commit message contains "#build-all", run everything.
|
# * We are on main
|
||||||
# Use #build-all in a commit message to force a full build on a PR
|
# * Changes are made to github workflows
|
||||||
# branch (useful for testing release builds without merging to main).
|
# * A cargo-workspace file changed (lockfile or .cargo), as that could affect any crate anywhere
|
||||||
if [ ${GITHUB_REF} = 'refs/heads/main' ] || git diff --name-only $lcommit..HEAD | grep -qe ^.github/workflows/ -e ^.cargo || git log -1 --format='%s %b' | grep -qF '#build-all'
|
# * Something from the script or dist folder changed (could be gated to installer, but some scripts like build_wpa_supplicant are part of the build process)
|
||||||
|
# * #build-all was used by the user to explicitly ask for this
|
||||||
|
if [ ${GITHUB_REF} = 'refs/heads/main' ] || git diff --name-only $lcommit..HEAD | grep -qe ^.github/workflows/ -e ^.cargo -e '^Cargo\.lock$' -e '^Cargo\.toml$' -e ^dist/ -e ^scripts/ || git log -1 --format='%s %b' | grep -qF '#build-all'
|
||||||
then
|
then
|
||||||
echo "building everything"
|
echo "building everything"
|
||||||
echo code_count=forced >> "$GITHUB_OUTPUT"
|
echo code_count=forced >> "$GITHUB_OUTPUT"
|
||||||
|
|||||||
Reference in New Issue
Block a user