mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
[Buildkite] Fix CI docs bypass by ensuring HEAD diff for master is correct (#699)
This commit is contained in:
parent
7a0d217b67
commit
6af27cb3f9
|
@ -1,9 +1,15 @@
|
|||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
if [[ $BUILDKITE_BRANCH == "master" ]]; then
|
||||
CI_DOCS_BYPASS=$(git diff --name-only HEAD~1 | sed -rn '/^docs\/.*/!{q1}' && echo true || echo false)
|
||||
else
|
||||
CI_DOCS_BYPASS=$(git diff --name-only `git merge-base --fork-point origin/master` | sed -rn '/^docs\/.*/!{q1}' && echo true || echo false)
|
||||
fi
|
||||
|
||||
cat << EOF
|
||||
env:
|
||||
CI_DOCS_BYPASS: $(git diff --name-only `git merge-base --fork-point origin/master` | sed -rn '/^docs\/.*/!{q1}' && echo true || echo false)
|
||||
CI_DOCS_BYPASS: ${CI_DOCS_BYPASS}
|
||||
|
||||
steps:
|
||||
- label: ":docker: Image Deployments"
|
||||
|
|
|
@ -1,9 +1,15 @@
|
|||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
if [[ $BUILDKITE_BRANCH == "master" ]]; then
|
||||
CI_DOCS_BYPASS=$(git diff --name-only HEAD~1 | sed -rn '/^docs\/.*/!{q1}' && echo true || echo false)
|
||||
else
|
||||
CI_DOCS_BYPASS=$(git diff --name-only `git merge-base --fork-point origin/master` | sed -rn '/^docs\/.*/!{q1}' && echo true || echo false)
|
||||
fi
|
||||
|
||||
cat << EOF
|
||||
env:
|
||||
CI_DOCS_BYPASS: $(git diff --name-only `git merge-base --fork-point origin/master` | sed -rn '/^docs\/.*/!{q1}' && echo true || echo false)
|
||||
CI_DOCS_BYPASS: ${CI_DOCS_BYPASS}
|
||||
|
||||
steps:
|
||||
- label: ":hammer_and_wrench: Unit Test"
|
||||
|
|
Loading…
Reference in New Issue
Block a user