Skip to content

Commit

Permalink
Output file
Browse files Browse the repository at this point in the history
  • Loading branch information
JackPlowman committed Sep 30, 2024
1 parent c9aa465 commit 194090d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/action-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,3 @@ jobs:
uses: JackPlowman/github-stats-analyser@main
with:
repository_owner: ${{ github.repository_owner }}

- name: Check Files
run: |
ls -la
ls -la statistics
ls -la cloned_repositories
ls -la analyser
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ author: "Jack Plowman"
runs:
using: "docker"
image: "Dockerfile"
env:
GITHUB_ACTION: "true"
inputs:
github_token:
description: "The GitHub token"
Expand Down
23 changes: 14 additions & 9 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
#!/bin/sh
#!/bin/bash
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

0 comments on commit 194090d

Please sign in to comment.