-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Copy output file to GitHub runner (#103)
This change streamlines the GitHub Actions workflow and enhances the output handling of the analyser: 1. Removed unnecessary file checking steps from the `action-preview.yml` workflow file. 2. Simplified the `run.sh` script by: - Removing debug echo statements and environment variable printing - Adding a step to check the output using `ls -a` - Implementing a step to copy the `repository_statistics.json` file to the GitHub workspace These modifications improve the efficiency of the workflow and ensure that the analysis results are properly stored in the expected location. fixes #104
- Loading branch information
1 parent
c9aa465
commit 4c8f27f
Showing
3 changed files
with
16 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
#!/bin/sh | ||
set -e +x | ||
|
||
cd .. | ||
cd .. | ||
# Echo cwd | ||
echo "Current working directory: $(pwd)" | ||
# Show files | ||
ls -la | ||
|
||
printenv | ||
|
||
if [ "$GITHUB_ACTION" = "true" ]; then | ||
# if running in GitHub Actions, change to the root of the repository | ||
cd .. | ||
cd .. | ||
fi | ||
|
||
# Run the analyser | ||
python -m analyser | ||
|
||
# Check the output | ||
ls -a | ||
|
||
if [ "$GITHUB_ACTION" = "true" ]; then | ||
# if running in GitHub Actions, copy the output to the output directory | ||
cp statistics/repository_statistics.json github/workspace/repository_statistics.json | ||
fi |