Initial own-git docs, configs, scripts, and hardening pack
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"ignorePatterns": [
|
||||
{
|
||||
"pattern": "^ssh://"
|
||||
},
|
||||
{
|
||||
"pattern": "^git@"
|
||||
}
|
||||
],
|
||||
"replacementPatterns": [],
|
||||
"timeout": "20s",
|
||||
"retryOn429": true,
|
||||
"retryCount": 2,
|
||||
"fallbackRetryDelay": "2s",
|
||||
"aliveStatusCodes": [200, 206, 301, 302, 303, 307, 308]
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
name: HAProxy Config Check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "haproxy/**"
|
||||
- ".github/workflows/haproxy-lint.yml"
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "haproxy/**"
|
||||
- ".github/workflows/haproxy-lint.yml"
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install haproxy
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y haproxy
|
||||
|
||||
- name: Prepare include files and dummy cert
|
||||
run: |
|
||||
sudo mkdir -p /etc/haproxy /etc/haproxy/certs
|
||||
sudo cp haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg
|
||||
echo "127.0.0.1/32" | sudo tee /etc/haproxy/allowed_ips.lst >/dev/null
|
||||
echo "127.0.0.1/32" | sudo tee /etc/haproxy/allowed_ips_knock.lst >/dev/null
|
||||
openssl req -x509 -nodes -newkey rsa:2048 \
|
||||
-keyout /tmp/tls.key \
|
||||
-out /tmp/tls.crt \
|
||||
-days 1 \
|
||||
-subj "/CN=git.papatramp.ru"
|
||||
cat /tmp/tls.crt /tmp/tls.key | sudo tee /etc/haproxy/certs/papatramp.pem >/dev/null
|
||||
|
||||
- name: Validate haproxy cfg
|
||||
run: |
|
||||
sudo haproxy -c -f /etc/haproxy/haproxy.cfg
|
||||
@@ -0,0 +1,48 @@
|
||||
name: Scripts And Docs Check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "scripts/**"
|
||||
- "README.md"
|
||||
- "docs/**"
|
||||
- ".github/workflows/scripts-and-docs-check.yml"
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "scripts/**"
|
||||
- "README.md"
|
||||
- "docs/**"
|
||||
- ".github/workflows/scripts-and-docs-check.yml"
|
||||
|
||||
jobs:
|
||||
shellcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install shellcheck
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y shellcheck
|
||||
|
||||
- name: Run shellcheck
|
||||
run: |
|
||||
shellcheck scripts/*.sh
|
||||
|
||||
markdown-links:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check markdown links
|
||||
uses: gaurav-nelson/github-action-markdown-link-check@v1
|
||||
with:
|
||||
use-quiet-mode: "yes"
|
||||
use-verbose-mode: "no"
|
||||
config-file: ".github/mlc_config.json"
|
||||
folder-path: "."
|
||||
file-extension: ".md"
|
||||
Reference in New Issue
Block a user