EDUCATIONAL PURPOSES ONLY - DO NOT USE IN PRODUCTION
This repository contains a collection of GitHub Actions workflow examples designed for learning purposes. All workflows use manual triggers and placeholder values to ensure they cannot accidentally execute real actions.
- All workflows use
workflow_dispatchtrigger only (manual execution) - All secrets use placeholder values (e.g.,
PLACEHOLDER_TOKEN) - Dangerous steps are commented out with
continue-on-error: true - These workflows are for learning only, not for production use
.github/
└── workflows/
├── ci/ # Continuous Integration workflows
├── quality/ # Code quality checks
├── deployment/ # Deployment automation
├── notifications/ # Communication workflows
├── api-testing/ # API testing workflows
├── scheduled/ # Scheduled task workflows
├── artifacts/ # Artifact management workflows
└── environments/ # Environment-specific workflows
scripts/
├── bash/ # Bash scripts for automation
└── python/ # Python scripts for automation
notebooks/ # Jupyter notebooks for learning
examples/
├── config/ # Configuration file examples
└── data/ # Example data files
templates/ # Template files for workflows and scripts
- nodejs.yml - Node.js build, test, and lint pipeline
- python.yml - Python testing with pytest and type checking
- go.yml - Go module validation and testing
- ruby.yml - Ruby bundle install and RSpec tests
Key Concepts Learned:
- Matrix builds for multiple versions
- Dependency caching
- Setup actions for different languages
- Running tests and linters
- linting.yml - Code linting for JavaScript and Python
- formatting.yml - Code formatting checks (Prettier, Black)
- security.yml - Dependency audits and secret scanning
- coverage.yml - Test coverage reporting
Key Concepts Learned:
- Running multiple linters in parallel
- Security vulnerability scanning
- Coverage report generation
- Code quality enforcement
- github-pages.yml - Static site deployment to GitHub Pages
- docker.yml - Docker image build and push
- release.yml - Automated GitHub releases
- docs.yml - Documentation generation and updates
Key Concepts Learned:
- Building and pushing Docker images
- Creating GitHub releases
- Static site deployment
- Documentation automation
- slack.yml - Slack webhook notifications
- email.yml - Email notifications via SMTP
- discord.yml - Discord webhook messages
Key Concepts Learned:
- Webhook integrations
- Secret management for API keys
- Conditional notifications
- Message formatting
- postman.yml - API testing with Postman/Newman
- rest-assured.yml - API testing with Java/RestAssured
Key Concepts Learned:
- Running API test collections
- Generating test reports
- Integration with testing frameworks
- Automated API validation
- daily-backup.yml - Scheduled daily backup tasks
- weekly-report.yml - Scheduled weekly report generation
Key Concepts Learned:
- Cron-based scheduling
- Automated periodic tasks
- Backup and reporting automation
- Time-based workflow execution
- upload.yml - Build artifact upload
- download.yml - Artifact download between jobs
Key Concepts Learned:
- Artifact creation and storage
- Cross-job artifact sharing
- Build output management
- Artifact retention policies
- staging.yml - Staging environment deployment
- production.yml - Production environment deployment with approval
Key Concepts Learned:
- Environment-specific deployments
- Deployment protection rules
- Environment variables
- Production approval workflows
- backup.sh - Backup automation script
- deploy.sh - Deployment automation script
- health-check.sh - Application health check script
Usage: These scripts can be called from GitHub Actions using the run step:
- name: Run backup
run: ./scripts/bash/backup.sh- generate_report.py - Report generation script
- api_tester.py - API testing script
- data_processor.py - Data processing script
Usage: These scripts can be called from GitHub Actions:
- name: Generate report
run: python scripts/python/generate_report.py- github-actions-basics.ipynb - Interactive introduction to GitHub Actions
- workflow-examples.ipynb - Practical workflow examples
Usage: Open these notebooks in Jupyter to learn GitHub Actions concepts interactively.
- package.json - Example Node.js package configuration
- requirements.txt - Example Python dependencies
- Dockerfile - Example Docker configuration
- docker-compose.yml - Example Docker Compose setup
- .eslintrc.json - Example ESLint configuration
- pyproject.toml - Example Python project configuration
- sample_data.csv - Example CSV data for testing
- test_data.json - Example JSON data for testing
- workflow_template.yml - Template for creating new workflows
- script_template.sh - Template for bash scripts
- script_template.py - Template for Python scripts
Usage: Copy these templates and modify them for your specific needs.
- Explore the workflows: Browse the
.github/workflows/directory - Read the comments: Each workflow includes educational comments
- Understand the structure: Note the YAML syntax and GitHub Actions syntax
- Learn the patterns: Identify common patterns across workflows
- Study the scripts: Review bash and Python scripts in
scripts/directory - Use the notebooks: Open Jupyter notebooks for interactive learning
- Examine configurations: Check example configuration files in
examples/config/ - Use templates: Copy and modify templates in
templates/for your projects
on:
workflow_dispatch: # Manual trigger only
# Other triggers (commented out for safety):
# push:
# branches: [ main ]
# pull_request:
# branches: [ main ]jobs:
job-name:
runs-on: ubuntu-latest
steps:
- name: Step description
uses: action-name@version
with:
parameter: valueenv:
API_KEY: ${{ secrets.PLACEHOLDER_TOKEN }}strategy:
matrix:
version: [1.0, 2.0, 3.0]on:
schedule:
- cron: '0 2 * * *' # Runs daily at 2 AM UTCTo adapt these workflows for real use:
- Replace
workflow_dispatchwith appropriate triggers - Replace placeholder secrets with actual secret names
- Uncomment and configure dangerous steps
- Adjust commands and paths for your project
- Add required dependencies and configuration files
Educational use only. Modify and adapt as needed for learning purposes.
Remember: These workflows are designed for education. Always test thoroughly before using in production environments.