This GitHub Actions workflow is designed to select random members for certain activities based on specified criteria. It runs automatically on a schedule and can also be triggered manually.
The workflow is scheduled to run every Monday at 10:42 AM (UTC) using a cron expression '42 10 * * mon'
. You can adjust the cron schedule as needed by modifying the github-actions.yml
file.
Additionally, you can manually trigger this workflow as needed. To manually trigger the workflow:
The workflow consists of the following steps:
Checkout Repository: This step checks out your GitHub repository, allowing access to your code and workflow files.
Setup Python: It sets up a Python environment with version 3.8.
Install Dependencies: Installs the numpy
and pandas
Python packages using pip
. Make sure you have listed these dependencies in your pyproject.toml
or requirements.txt
if they are required by your project.
Run main.py
: Executes the main.py
script, which performs various tasks related to selecting random members for activities based on criteria like last participation and eligibility.
Create Team Sync Issue: This step creates a GitHub issue titled "Team sync" with specified details. It assigns the issue to specific users (hafro05
and nprime496
) and adds labels (weekly sync
and docs-team
). The issue body contains a message inviting users to contribute.
main.py
ScriptThe heart of this workflow is the main.py
script. It performs the following main tasks:
You can further customize the logic in the main.py
script to meet your specific requirements.
To use this GitHub Actions workflow for your project:
Create a copy of the github-actions.yml
file in your repository.
Customize the cron schedule, job steps, and any other parameters to fit your project's needs.
Ensure that your Python code in main.py
and any required dependencies are correctly set up and configured.
Configure any necessary secrets or environment variables in your GitHub repository settings.
Trigger the workflow manually or wait for the scheduled execution to begin.
Feel free to modify and extend this workflow to suit your project's requirements.