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
|
#!/bin/bash
|
||||||
set -u
|
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
|
cat << EOF
|
||||||
env:
|
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:
|
steps:
|
||||||
- label: ":docker: Image Deployments"
|
- label: ":docker: Image Deployments"
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -u
|
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
|
cat << EOF
|
||||||
env:
|
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:
|
steps:
|
||||||
- label: ":hammer_and_wrench: Unit Test"
|
- label: ":hammer_and_wrench: Unit Test"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user