Star-Track is a user-friendly utility for tracking GitHub repository statistics.
-
clone repositoryą
git clone https://github.com/roboflow/star-track.git
-
setup python environment and activate it [optional]
python3 -m venv venv source venv/bin/activate
-
install required dependencies
pip install -r requirements.txt
python -m startrack.app
To test the Docker solution locally, follow these steps:
-
Build the Docker Image
docker build -t startrack:latest .
-
Run the Docker Container
docker run --rm \ -e GITHUB_TOKEN=your_github_token \ -e INPUT_ORGANIZATIONS=org1,org2 \ -e INPUT_REPOSITORIES=user1/repo1,user2/repo2 \ -v $(pwd)/data:/app/data:z \ startrack:latest
--rm
: Automatically remove the container when it exits.-e GITHUB_TOKEN=your_github_token
: Set theGITHUB_TOKEN
environment variable.-e INPUT_ORGANIZATIONS=org1,org2
: Set theINPUT_ORGANIZATIONS
environment variable.-e INPUT_REPOSITORIES=user1/repo1,user2/repo2
: Set theINPUT_REPOSITORIES
environment variable.-v $(pwd)/data:/app/data
: Mount thedata
directory from your current working directory to the/app/data
directory in the container. This allows you to access the output CSV file on your host machine.startrack:latest
: The name of the Docker image to run.
- Ensure GitHub Token Permissions: Make sure your GitHub token has the necessary permissions to access the repositories you want to track.
- Data Directory: Ensure the
data
directory exists in your current working directory or Docker will create it for you. - Environment Variables: Adjust the environment variables as needed to match your specific use case.
By following these steps, you can test your Docker solution locally and ensure that your GitHub Action will work as expected. If you encounter any issues or need further assistance, feel free to ask!