GitHub Actions
March 4, 2022 ยท View on GitHub
GitHub Actions master template & GitHub Actions Shared Workflows library.
- main.yaml - GitHub Actions master workflow template
- .github/workflows/ - GitHub Actions Reusable Workflows Library
See Documentation for how to call these workflows directly from your own GitHub Actions workflow.
Fork this repo to have full control over all updates via Pull Requests. Create environment branches to stage updates across dev/staging/production.
Examples
In your GitHub repo, import these workflows by adding small yaml files to the .github/workflows/ directory.
Scan for Secrets and Security issues
Alerts appear under Security -> Code scanning alerts.
Create .github/workflows/semgrep.yaml:
on: [push]
jobs:
semgrep:
uses: buluma/GitHub-Actions/.github/workflows/semgrep.yaml@master
Analyze your Terraform code security & best practices
Alerts appear under Security -> Code scanning alerts.
Create .github/workflows/tfsec.yaml:
on: [push]
jobs:
tfsec:
uses: buluma/Gi/tHub-Actions/.github/workflows/tfsec.yaml@master
Docker Build and push to DockerHub
Create .github/workflows/docker_build.yaml:
on: [push]
jobs:
docker_build:
uses: buluma/GitHub-Actions/.github/workflows/docker_build.yaml@master
with:
repo: user/repo # your DockerHub user/repo
tags: latest v1.1
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
Docker Build and push to AWS ECR
Create .github/workflows/docker_build_aws_ecr.yaml:
on: [push]
jobs:
docker_build:
uses: buluma/GitHub-Actions/.github/workflows/docker_build_aws_ecr.yaml@master
with:
repo: MY_ECR_REPO
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
Creates several useful tags, supports multi-stage build caching, see README for details.
Check for Broken URL Links
Create .github/workflows/url_links.yaml:
on: [push]
jobs:
url_links:
uses: buluma/GitHub-Actions/.github/workflows/url_links.yaml@master
See README for details on ignoring inaccessible / partially constructed links or those containing variables
Auto-Merge Production hotfixes back to Staging
Merges via a Pull Request for full auditing.
Create .github/workflows/merge_production_to_staging.yaml:
on: [push]
jobs:
merge:
if: github.ref_name == 'production'
uses: buluma/GitHub-Actions/.github/workflows/merge-branch.yaml@master
with:
head: production # from
base: staging # to
See Also
-
Jenkins - Advanced Jenkinsfile & Jenkins Shared Library
-
Templates - Code & Config templates for many popular DevOps technologies
-
DevOps Bash Tools - 700+ DevOps Bash Scripts, Advanced
.bashrc,.vimrc,.screenrc,.tmux.conf,.gitconfig, CI configs & Utility Code Library - AWS, GCP, Kubernetes, Docker, Kafka, Hadoop, SQL, BigQuery, Hive, Impala, PostgreSQL, MySQL, LDAP, DockerHub, Jenkins, Spotify API & MP3 tools, Git tricks, GitHub API, GitLab API, BitBucket API, Code & build linting, package management for Linux / Mac / Python / Perl / Ruby / NodeJS / Golang, and lots more random goodies -
SQL Scripts - 100+ SQL Scripts - PostgreSQL, MySQL, AWS Athena, Google BigQuery
-
Kubernetes configs - Kubernetes YAML configs - Best Practices, Tips & Tricks are baked right into the templates for future deployments
-
DevOps Python Tools - 80+ DevOps CLI tools for AWS, GCP, Hadoop, HBase, Spark, Log Anonymizer, Ambari Blueprints, AWS CloudFormation, Linux, Docker, Spark Data Converters & Validators (Avro / Parquet / JSON / CSV / INI / XML / YAML), Elasticsearch, Solr, Travis CI, Pig, IPython
-
The Advanced Nagios Plugins Collection - 450+ programs for Nagios monitoring your Hadoop & NoSQL clusters. Covers every Hadoop vendor's management API and every major NoSQL technology (HBase, Cassandra, MongoDB, Elasticsearch, Solr, Riak, Redis etc.) as well as message queues (Kafka, RabbitMQ), continuous integration (Jenkins, Travis CI) and traditional infrastructure (SSL, Whois, DNS, Linux)
-
DevOps Perl Tools - 25+ DevOps CLI tools for Hadoop, HDFS, Hive, Solr/SolrCloud CLI, Log Anonymizer, Nginx stats & HTTP(S) URL watchers for load balanced web farms, Dockerfiles & SQL ReCaser (MySQL, PostgreSQL, AWS Redshift, Snowflake, Apache Drill, Hive, Impala, Cassandra CQL, Microsoft SQL Server, Oracle, Couchbase N1QL, Dockerfiles, Pig Latin, Neo4j, InfluxDB), Ambari FreeIPA Kerberos, Datameer, Linux...
-
HAProxy Configs - 80+ HAProxy Configs for Hadoop, Big Data, NoSQL, Docker, Elasticsearch, SolrCloud, HBase, Cloudera, Hortonworks, MapR, MySQL, PostgreSQL, Apache Drill, Hive, Presto, Impala, ZooKeeper, OpenTSDB, InfluxDB, Prometheus, Kibana, Graphite, SSH, RabbitMQ, Redis, Riak, Rancher etc.
-
Dockerfiles - 50+ DockerHub public images for Docker & Kubernetes - Hadoop, Kafka, ZooKeeper, HBase, Cassandra, Solr, SolrCloud, Presto, Apache Drill, Nifi, Spark, Mesos, Consul, Riak, OpenTSDB, Jython, Advanced Nagios Plugins & DevOps Tools repos on Alpine, CentOS, Debian, Fedora, Ubuntu, Superset, H2O, Serf, Alluxio / Tachyon, FakeS3