Skip to content

Commit 13fa779

Browse files
Initial commit
0 parents  commit 13fa779

91 files changed

Lines changed: 16727 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
**/__pycache__
2+
**/.classpath
3+
**/.dockerignore
4+
**/.DS_Store
5+
**/.editorconfig
6+
**/.env
7+
**/.git
8+
**/.github
9+
**/.gitignore
10+
**/.project
11+
**/.settings
12+
**/.toolstarget
13+
**/.vs
14+
**/.vscode
15+
**/*.*proj.user
16+
**/*.dbmdl
17+
**/*.jfm
18+
**/*.py#
19+
**/*.py~
20+
**/*.pyc
21+
**/azds.yaml
22+
**/bin
23+
**/charts
24+
**/compose*
25+
**/csv
26+
**/django
27+
**/docker-compose*
28+
**/Dockerfile*
29+
**/img
30+
**/node_modules
31+
**/npm-debug.log
32+
**/obj
33+
**/README.md
34+
**/secrets.dev.yaml
35+
**/terraform
36+
**/values.dev.yaml

.editorconfig

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines and whitespace cleanup
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
13+
# Protect whitespace in markdown files
14+
[*.md]
15+
trim_trailing_whitespace = false
16+
17+
# general formatting
18+
[*.{bash,go,sh,zsh,Makefile}]
19+
indent_style = tab
20+
indent_size = 4
21+
22+
# Set default charset
23+
[*.{html,xml,js,css,py}]
24+
charset = utf-8
25+
26+
# python
27+
[*.py]
28+
indent_style = space
29+
indent_size = 4
30+
31+
# webdev + terraform
32+
[*.{html,xml,js,css,gql,tf,tfvars,yml,yaml}]
33+
indent_style = space
34+
indent_size = 2

.github/FUNDING.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# These are supported funding model platforms
2+
3+
github: [pythoninthegrass]
4+
# custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
5+
# patreon: # Replace with a single Patreon username
6+
# open_collective: # Replace with a single Open Collective username
7+
# ko_fi: # Replace with a single Ko-fi username
8+
# tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
9+
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
10+
# liberapay: # Replace with a single Liberapay username
11+
# issuehunt: # Replace with a single IssueHunt username
12+
# otechie: # Replace with a single Otechie username
13+
# lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem
6+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#directory
7+
8+
version: 2
9+
updates:
10+
- package-ecosystem: "pip" # package manager
11+
directory: "/" # Files stored in repository root
12+
schedule:
13+
interval: "weekly"
14+
day: "saturday"
15+
time: "10:00"
16+
timezone: "America/Chicago"
17+
open-pull-requests-limit: 5

.github/workflows/auto_merge.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#approve-a-pull-request
2+
3+
name: auto_merge
4+
on: [pull_request, workflow_dispatch] # pull_request, push, workflow_dispatch
5+
6+
permissions:
7+
pull-requests: write
8+
9+
jobs:
10+
dependabot:
11+
runs-on: ubuntu-latest
12+
if: ${{ github.actor == 'dependabot[bot]' }}
13+
steps:
14+
- name: Dependabot metadata
15+
id: metadata
16+
uses: dependabot/fetch-metadata@v1.1.1
17+
with:
18+
github-token: "${{ secrets.GITHUB_TOKEN }}"
19+
- name: Approve a PR
20+
run: gh pr review --approve "$PR_URL"
21+
env:
22+
PR_URL: ${{github.event.pull_request.html_url}}
23+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
24+
- name: Merge a PR
25+
run: gh pr merge "$PR_URL" --auto --squash
26+
env:
27+
PR_URL: ${{github.event.pull_request.html_url}}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: codeql
13+
14+
on:
15+
push:
16+
branches: [ "main" ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ "main" ]
20+
schedule:
21+
- cron: '37 22 * * 4'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'python' ]
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v3
42+
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v2
46+
with:
47+
languages: ${{ matrix.language }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
51+
52+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53+
# queries: security-extended,security-and-quality
54+
55+
56+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
57+
# If this step fails, then you should remove it and run the build manually (see below)
58+
- name: Autobuild
59+
uses: github/codeql-action/autobuild@v2
60+
61+
# ℹ️ Command-line programs to run using the OS shell.
62+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
63+
64+
# If the Autobuild fails above, remove it and uncomment the following three lines.
65+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
66+
67+
# - run: |
68+
# echo "Run, Build Application using script"
69+
# ./location_of_script_within_repo/buildscript.sh
70+
71+
- name: Perform CodeQL Analysis
72+
uses: github/codeql-action/analyze@v2

.github/workflows/echo_secret.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: echo_secret
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- shell: bash
12+
env:
13+
SUPER_SECRET: ${{ secrets.CREDS }}
14+
run: |
15+
echo "$SUPER_SECRET"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env python3
2+
3+
"""Helper script to be used as a pre-commit hook."""
4+
import os
5+
import sys
6+
import subprocess
7+
8+
9+
def gitleaksEnabled():
10+
"""Determine if the pre-commit hook for gitleaks is enabled."""
11+
out = subprocess.getoutput("git config --bool hooks.gitleaks")
12+
if out == "false":
13+
return False
14+
return True
15+
16+
17+
if gitleaksEnabled():
18+
exitCode = os.WEXITSTATUS(os.system('gitleaks protect -v --staged'))
19+
if exitCode == 1:
20+
print('''Warning: gitleaks has detected sensitive information in your changes.
21+
To disable the gitleaks precommit hook run the following command:
22+
23+
git config hooks.gitleaks false
24+
''')
25+
sys.exit(1)
26+
else:
27+
print('gitleaks precommit disabled\
28+
(enable with `git config hooks.gitleaks true`)')

.github/workflows/main.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: gitleaks
2+
3+
on: [pull_request, push, workflow_dispatch]
4+
5+
jobs:
6+
scan:
7+
name: gitleaks
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
with:
12+
fetch-depth: 0
13+
- uses: gitleaks/gitleaks-action@v2
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}} # Only required for Organizations, not personal accounts.

.github/workflows/push.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: push
2+
3+
on: push
4+
5+
jobs:
6+
push:
7+
name: Push to Docker Hub
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Docker meta
11+
id: meta
12+
uses: docker/metadata-action@v3
13+
with:
14+
images: your-username/your-image-name
15+
tags: |
16+
type=ref,prefix=dev-,event=branch
17+
type=semver,pattern={{version}}
18+
type=semver,pattern={{major}}
19+
type=semver,pattern={{major}}.{{minor}}
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v1
22+
- name: Login to DockerHub
23+
uses: docker/login-action@v1
24+
with:
25+
username: ${{ secrets.DOCKERHUB_USERNAME }}
26+
password: ${{ secrets.DOCKERHUB_TOKEN }}
27+
- name: Build and push
28+
id: docker_build
29+
uses: docker/build-push-action@v2
30+
with:
31+
push: true
32+
tags: ${{ steps.meta.outputs.tags }}
33+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)