mirror of
https://github.com/nextcloud/talk-android
synced 2025-01-31 11:32:00 +00:00
🔄 Synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <android@nextcloud.com>
This commit is contained in:
parent
f0b865ca46
commit
c4adbf25f9
32
.github/workflows/detectNewJavaFiles.yml
vendored
Normal file
32
.github/workflows/detectNewJavaFiles.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
name: "Detect new java files"
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [ master, stable-* ]
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
detectNewJavaFiles:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- id: file_changes
|
||||||
|
uses: trilom/file-changes-action@v1.2.4
|
||||||
|
with:
|
||||||
|
output: ','
|
||||||
|
- name: Detect new java files
|
||||||
|
run: |
|
||||||
|
if [ -z '${{ steps.file_changes.outputs.files_added }}' ]; then
|
||||||
|
echo "No new files added"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
new_java=$(echo '${{ steps.file_changes.outputs.files_added }}' | tr ',' '\n' | grep '\.java$' | cat)
|
||||||
|
if [ -n "$new_java" ]; then
|
||||||
|
# shellcheck disable=SC2016
|
||||||
|
printf 'New java files detected:\n```\n%s\n```\n' "$new_java" | tee "$GITHUB_STEP_SUMMARY"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "No new java files detected"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user