mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-02-01 21:51:51 +00:00
Update generate-app-headers.yaml
This commit is contained in:
parent
860c541606
commit
02f480998e
25
.github/workflows/generate-app-headers.yaml
vendored
25
.github/workflows/generate-app-headers.yaml
vendored
@ -6,7 +6,6 @@ on:
|
|||||||
- closed
|
- closed
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
# Trigger nur, wenn der PR gemerged wurde
|
|
||||||
if: github.event.pull_request.merged == true
|
if: github.event.pull_request.merged == true
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "59 23 * * *" # Führen den Workflow täglich um 23:59 UTC aus
|
- cron: "59 23 * * *" # Führen den Workflow täglich um 23:59 UTC aus
|
||||||
@ -49,26 +48,26 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git merge origin/main --no-edit || echo "No changes to merge from main."
|
git merge origin/main --no-edit || echo "No changes to merge from main."
|
||||||
|
|
||||||
# Step 5: Identify changes in .sh files
|
# Step 5: Identify added .sh files and extract app names
|
||||||
- name: Check for .sh files and extract app names
|
- name: Check for added .sh files and extract app names
|
||||||
id: detect_sh_files
|
id: detect_sh_files
|
||||||
run: |
|
run: |
|
||||||
# Get the list of changed files in the PR
|
# Get the list of added files in the PR (new .sh files)
|
||||||
CHANGED_FILES=$(git diff --name-only HEAD origin/main)
|
ADDED_FILES=$(git diff --name-only --diff-filter=A HEAD origin/main)
|
||||||
|
|
||||||
# Find .sh files and extract app names
|
# Filter out the .sh files
|
||||||
CHANGED_SH_FILES=$(echo "$CHANGED_FILES" | grep '\.sh$')
|
ADDED_SH_FILES=$(echo "$ADDED_FILES" | grep '\.sh$')
|
||||||
|
|
||||||
if [ -z "$CHANGED_SH_FILES" ]; then
|
if [ -z "$ADDED_SH_FILES" ]; then
|
||||||
echo "No .sh files changed."
|
echo "No new .sh files added."
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo "Changed .sh files detected:"
|
echo "New .sh files added:"
|
||||||
echo "$CHANGED_SH_FILES"
|
echo "$ADDED_SH_FILES"
|
||||||
|
|
||||||
# Extract app names from the file names or content
|
# Extract app names from the file names
|
||||||
APP_NAMES=""
|
APP_NAMES=""
|
||||||
for FILE in $CHANGED_SH_FILES; do
|
for FILE in $ADDED_SH_FILES; do
|
||||||
# Assuming the app name is part of the file name (e.g., 'appName.sh')
|
# Assuming the app name is part of the file name (e.g., 'appName.sh')
|
||||||
APP_NAME=$(basename "$FILE" .sh)
|
APP_NAME=$(basename "$FILE" .sh)
|
||||||
APP_NAMES="$APP_NAMES$APP_NAME "
|
APP_NAMES="$APP_NAMES$APP_NAME "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user