Skip to content

Commit dc02988

Browse files
authored
Add common workflows and files (#11)
1 parent fdce141 commit dc02988

13 files changed

+153
-6
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Dependabot auto-merge
2+
on: pull_request_target
3+
4+
permissions:
5+
contents: read
6+
7+
jobs:
8+
dependabot:
9+
runs-on: ubuntu-22.04
10+
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
11+
permissions:
12+
pull-requests: write
13+
contents: write
14+
steps:
15+
- name: Dependabot metadata
16+
id: dependabot-metadata
17+
uses: dependabot/fetch-metadata@5e5f99653a5b510e8555840e80cbf1514ad4af38 # v2.1.0
18+
19+
- name: Enable auto-merge for Dependabot PRs
20+
run: gh pr merge --auto --squash "$PR_URL"
21+
env:
22+
PR_URL: ${{github.event.pull_request.html_url}}
23+
GITHUB_TOKEN: ${{ secrets.NGINX_PAT }}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Dependency Review"
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
7+
concurrency:
8+
group: ${{ github.ref_name }}-deps-review
9+
cancel-in-progress: true
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
dependency-review:
16+
runs-on: ubuntu-22.04
17+
permissions:
18+
contents: read # for actions/checkout
19+
pull-requests: write # for actions/dependency-review-action to post comments
20+
steps:
21+
- name: "Checkout Repository"
22+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
23+
24+
- name: "Dependency Review"
25+
uses: actions/dependency-review-action@72eb03d02c7872a771aacd928f3123ac62ad6d3a # v4.3.3
26+
with:
27+
config-file: "./dependency-review-config.yml"

.github/workflows/sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- labels.yml
77
schedule:
88
- cron: "8 0 * * 1" # run every Monday at 00:08 UTC
9-
workflow_dispatch:
9+
workflow_dispatch: # yamllint disable-line rule:empty-values
1010

1111
concurrency:
1212
group: ${{ github.ref_name }}-sync

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Vim
2+
*.swp
3+
*.swo
4+
5+
# GoLand IDE and VSCode
6+
.idea
7+
.vscode
8+
9+
# MacOS Finder
10+
.DS_Store

.markdownlint-cli2.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Rule configuration.
2+
# For rule descriptions and how to fix: https://github.com/DavidAnson/markdownlint/tree/main#rules--aliases
3+
config:
4+
ul-style:
5+
style: dash
6+
no-duplicate-heading:
7+
siblings_only: true
8+
line-length:
9+
line_length: 120
10+
code_blocks: false
11+
tables: false
12+
13+
# Define glob expressions to ignore
14+
ignores:
15+
- ".github/"
16+
17+
# Fix any fixable errors
18+
fix: true

.pre-commit-config.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.6.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: end-of-file-fixer
9+
- id: check-yaml
10+
args: [--allow-multiple-documents]
11+
- id: check-ast
12+
- id: check-added-large-files
13+
- id: check-merge-conflict
14+
- id: check-shebang-scripts-are-executable
15+
- id: check-executables-have-shebangs
16+
- id: check-symlinks
17+
- id: check-case-conflict
18+
- id: check-vcs-permalinks
19+
- id: check-json
20+
- id: pretty-format-json
21+
args: [--autofix, --no-ensure-ascii]
22+
- id: mixed-line-ending
23+
args: [--fix=lf]
24+
- id: no-commit-to-branch
25+
- id: requirements-txt-fixer
26+
- id: fix-byte-order-marker
27+
28+
- repo: https://github.com/gitleaks/gitleaks
29+
rev: v8.18.3
30+
hooks:
31+
- id: gitleaks
32+
33+
- repo: https://github.com/DavidAnson/markdownlint-cli2
34+
rev: v0.13.0
35+
hooks:
36+
- id: markdownlint-cli2
37+
38+
- repo: https://github.com/adrienverge/yamllint.git
39+
rev: v1.35.1
40+
hooks:
41+
- id: yamllint

.yamllint.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
yaml-files:
3+
- "*.yaml"
4+
- "*.yml"
5+
6+
ignore-from-file: .gitignore
7+
8+
extends: default
9+
10+
rules:
11+
comments:
12+
min-spaces-from-content: 1
13+
comments-indentation: enable
14+
document-start: disable
15+
empty-values: enable
16+
line-length:
17+
max: 120
18+
ignore: |
19+
.goreleaser.yml
20+
.github/
21+
truthy:
22+
check-keys: false

files/nap-waf-v5-debian-11.repo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ Types: deb
55
URIs: https://pkgs.nginx.com/app-protect-x-plus/debian
66
Suites: bullseye
77
Components: nginx-plus
8-
Signed-By: /usr/share/keyrings/nginx-archive-keyring.gpg
8+
Signed-By: /usr/share/keyrings/nginx-archive-keyring.gpg

files/nap-waf-v5-debian-12.repo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ Types: deb
55
URIs: https://pkgs.nginx.com/app-protect-x-plus/debian
66
Suites: bookworm
77
Components: nginx-plus
8-
Signed-By: /usr/share/keyrings/nginx-archive-keyring.gpg
8+
Signed-By: /usr/share/keyrings/nginx-archive-keyring.gpg

files/nap-waf-v5-ubi-8.repo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ baseurl=https://pkgs.nginx.com/app-protect-x-plus/centos/8/$basearch/
44
sslclientcert=/etc/ssl/nginx/nginx-repo.crt
55
sslclientkey=/etc/ssl/nginx/nginx-repo.key
66
gpgcheck=0
7-
enabled=1
7+
enabled=1

files/nap-waf-v5-ubi-9.repo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ baseurl=https://pkgs.nginx.com/app-protect-x-plus/centos/9/$basearch/
44
sslclientcert=/etc/ssl/nginx/nginx-repo.crt
55
sslclientkey=/etc/ssl/nginx/nginx-repo.key
66
gpgcheck=0
7-
enabled=1
7+
enabled=1

files/patch-os.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
patch_debian() {
44
echo "Patching Debian"
55
apt-get update
6-
apt-get upgrade -y
6+
apt-get upgrade -y
77
rm -rf /var/lib/apt/lists/*
88
}
99

0 commit comments

Comments
 (0)