Skip to content

Commit

Permalink
Fix ECS template backup directory
Browse files Browse the repository at this point in the history
  • Loading branch information
QU3B1M committed Jan 23, 2025
1 parent 46b8775 commit 9bf9136
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/generate-ecs-mappings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,10 @@ jobs:
run: |
bash ecs/scripts/generate-pr-to-plugins.sh \
-b ${{ steps.branch-name.outputs.branch }} \
-o ecs-templates && echo "PR_URL=$PR_URL" >> $GITHUB_OUTPUT
- name: Show PR URL as a notation
run: echo "::notice title=Pull Request URL::${{ steps.generate-pr.outputs.PR_URL }}"
-o ./ecs-templates
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ecs-templates
path: "ecs-templates"
path: "./ecs-templates"
7 changes: 6 additions & 1 deletion ecs/scripts/generate-pr-to-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ commit_and_push_changes() {
fi
# Save the template on the output path
mkdir -p "$OUTPUT_PATH"
cp "$CURRENT_PATH/ecs/$ecs_module/$MAPPINGS_SUBPATH" "$TEMPLATES_PATH/$target_file"
cp "$CURRENT_PATH/ecs/$ecs_module/$MAPPINGS_SUBPATH" "$OUTPUT_PATH/$target_file"
# Copy the template to the plugins repository
mkdir -p $TEMPLATES_PATH
echo " - Copy template for module '$ecs_module' to '$target_file'"
Expand Down Expand Up @@ -227,6 +227,11 @@ create_or_update_pr() {
export PR_URL="$pr_url"
echo "Pull request updated: $PR_URL"
fi

# If the script is executed in a GHA, add a notice command.
if check_running_on_gha; then
echo "::notice::Pull Request URL:${PR_URL}"
fi
}

# Display usage information.
Expand Down
1 change: 1 addition & 0 deletions ecs/states-inventory-hotfixes/fields/subset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ fields:
groups: {}
id: {}
name: {}
type: {}
host:
fields: "*"
package:
Expand Down

0 comments on commit 9bf9136

Please sign in to comment.