Compare commits
No commits in common. "88ffab434c5bbe09acf736d785c6adbb372df426" and "ec3f19420cc2570fc74edbc4374728e1f950877f" have entirely different histories.
88ffab434c
...
ec3f19420c
|
|
@ -14,50 +14,19 @@ jobs:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
fetch-depth: 2
|
|
||||||
|
|
||||||
- id: filter
|
- id: filter
|
||||||
name: Detect changes
|
uses: dorny/paths-filter@v3
|
||||||
run: |
|
with:
|
||||||
set -euo pipefail
|
filters: |
|
||||||
git fetch --quiet --depth=1 origin "${GITHUB_BASE_REF:-}" || true
|
backend:
|
||||||
|
- 'back001/**'
|
||||||
files=""
|
- '.forgejo/workflows/**'
|
||||||
if [ "${GITHUB_EVENT_NAME:-}" = "pull_request" ] && [ -n "${GITHUB_BASE_REF:-}" ]; then
|
- 'ci/**'
|
||||||
base_ref="origin/${GITHUB_BASE_REF}"
|
frontend:
|
||||||
if git rev-parse --verify "$base_ref" >/dev/null 2>&1; then
|
- 'front001/**'
|
||||||
files="$(git diff --name-only "$base_ref"...HEAD)" || true
|
- '.forgejo/workflows/**'
|
||||||
else
|
- 'ci/**'
|
||||||
files=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$files" ]; then
|
|
||||||
if [ -n "${GITHUB_SHA:-}" ]; then
|
|
||||||
files="$(git show --name-only --pretty= "${GITHUB_SHA}")"
|
|
||||||
else
|
|
||||||
files="$(git show --name-only --pretty= HEAD)"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
backend=false
|
|
||||||
frontend=false
|
|
||||||
while IFS= read -r path; do
|
|
||||||
case "$path" in
|
|
||||||
back001/*|.forgejo/workflows/*|ci/*) backend=true ;;
|
|
||||||
esac
|
|
||||||
case "$path" in
|
|
||||||
front001/*|.forgejo/workflows/*|ci/*) frontend=true ;;
|
|
||||||
esac
|
|
||||||
done <<EOF
|
|
||||||
$files
|
|
||||||
EOF
|
|
||||||
|
|
||||||
{
|
|
||||||
echo "backend=$backend"
|
|
||||||
echo "frontend=$frontend"
|
|
||||||
} >> "$GITHUB_OUTPUT"
|
|
||||||
outputs:
|
outputs:
|
||||||
backend: ${{ steps.filter.outputs.backend }}
|
backend: ${{ steps.filter.outputs.backend }}
|
||||||
frontend: ${{ steps.filter.outputs.frontend }}
|
frontend: ${{ steps.filter.outputs.frontend }}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue