Skip to content

Commit e8ff1a1

Browse files
authored
Initial commit
0 parents  commit e8ff1a1

16 files changed

+696
-0
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Main global owner #
2+
#####################
3+
*

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
### Describe the bug
10+
11+
A clear and concise description of what the bug is.
12+
13+
### To reproduce
14+
15+
Steps to reproduce the behavior:
16+
17+
1. Deploy this project using ...
18+
2. View output/logs/configuration on ...
19+
3. See error
20+
21+
### Expected behavior
22+
23+
A clear and concise description of what you expected to happen.
24+
25+
### Your environment
26+
27+
- Version/release of this project or specific commit
28+
<!-- - Version/release of any relevant project languages -->
29+
- Target deployment platform
30+
31+
### Additional context
32+
33+
Add any other context about the problem here.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
### Is your feature request related to a problem? Please describe
10+
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when ...
12+
13+
### Describe the solution you'd like
14+
15+
A clear and concise description of what you want to happen.
16+
17+
### Describe alternatives you've considered
18+
19+
A clear and concise description of any alternative solutions or features you've considered.
20+
21+
### Additional context
22+
23+
Add any other context or screenshots about the feature request here.

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: github-actions
5+
directory: /
6+
schedule:
7+
interval: weekly
8+
day: monday
9+
time: "00:00"

.github/pull_request_template.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
### Proposed changes
2+
3+
Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue using one of the [supported keywords](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue) here in this description (not in the title of the PR).
4+
5+
### Checklist
6+
7+
Before creating a PR, run through this checklist and mark each as complete.
8+
9+
- [ ] I have read the [`CONTRIBUTING`](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}}/blob/main/CONTRIBUTING.md) document
10+
- [ ] If applicable, I have added tests that prove my fix is effective or that my feature works
11+
- [ ] If applicable, I have checked that any relevant tests pass after adding my changes
12+
- [ ] I have updated any relevant documentation ([`README.md`](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}}/blob/main/README.md) and [`CHANGELOG.md`](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}}/blob/main/CHANGELOG.md))

.github/workflows/ossf_scorecard.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# This workflow uses actions that are not certified by GitHub. They are provided
2+
# by a third-party and are governed by separate terms of service, privacy
3+
# policy, and support documentation.
4+
name: OSSF Scorecard
5+
on:
6+
# For Branch-Protection check. Only the default branch is supported. See
7+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
8+
branch_protection_rule:
9+
# To guarantee Maintained check is occasionally updated. See
10+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
11+
schedule:
12+
- cron: "0 0 * * 1"
13+
push:
14+
branches: [main, master]
15+
# Declare default permissions as read only.
16+
permissions: read-all
17+
jobs:
18+
analysis:
19+
name: Scorecard analysis
20+
runs-on: ubuntu-22.04
21+
permissions:
22+
# Needed if using Code scanning alerts
23+
security-events: write
24+
# Needed for GitHub OIDC token if publish_results is true
25+
id-token: write
26+
# Uncomment the permissions below if installing in a private repository.
27+
# contents: read
28+
# actions: read
29+
# issues: read # To allow GraphQL ListCommits to work
30+
# pull-requests: read # To allow GraphQL ListCommits to work
31+
# checks: read # To detect SAST tools
32+
steps:
33+
- name: Check out the codebase
34+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
35+
with:
36+
persist-credentials: false
37+
38+
- name: Run analysis
39+
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
40+
with:
41+
results_file: results.sarif
42+
results_format: sarif
43+
# (Optional) fine-grained personal access token. Uncomment the `repo_token` line below if:
44+
# - you want to enable the Branch-Protection check on a *public* repository, or
45+
# - you are installing Scorecard on a *private* repository
46+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-fine-grained-pat-optional.
47+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
48+
49+
# Publish the results for public repositories to enable scorecard badges. For more details, see
50+
# https://github.com/ossf/scorecard-action#publishing-results.
51+
# For private repositories, `publish_results` will automatically be set to `false`, regardless
52+
# of the value entered here.
53+
publish_results: true
54+
55+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
56+
# format to the repository Actions tab.
57+
- name: Upload artifact
58+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
59+
with:
60+
name: SARIF file
61+
path: results.sarif
62+
retention-days: 5
63+
64+
# Upload the results to GitHub's code scanning dashboard.
65+
- name: Upload SARIF results to code scanning
66+
uses: github/codeql-action/upload-sarif@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
67+
with:
68+
sarif_file: results.sarif

.github/workflows/rename_template.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Rename the template
3+
on:
4+
push:
5+
permissions: read-all
6+
jobs:
7+
rename-template:
8+
name: Replace the templated variables in the repository with the newly created repository details
9+
if: ${{ !contains(github.repository, 'template') }}
10+
runs-on: ubuntu-22.04
11+
permissions:
12+
contents: write
13+
steps:
14+
- name: Check out the codebase
15+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
16+
17+
- name: Set $REPOSITORY_NAME
18+
run: echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}' | tr '-' '_' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
19+
shell: bash
20+
21+
- name: Set $REPOSITORY_URL
22+
run: echo "REPOSITORY_URL=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
23+
shell: bash
24+
25+
- name: Set $REPOSITORY_OWNER
26+
run: echo "REPOSITORY_OWNER=$(echo '${{ github.repository }}' | awk -F '/' '{print $1}')" >> $GITHUB_ENV
27+
shell: bash
28+
29+
- name: Rename the project
30+
run: |
31+
echo "Renaming the project with -a(author) ${{ env.REPOSITORY_OWNER }} -n(name) ${{ env.REPOSITORY_NAME }} -u(urlname) ${{ env.REPOSITORY_URL }}"
32+
.github/workflows/scripts/rename_project.sh -a ${{ env.REPOSITORY_OWNER }} -n ${{ env.REPOSITORY_NAME }} -u ${{ env.REPOSITORY_URL }}
33+
34+
- name: Commit and push changes
35+
uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5.0.0
36+
with:
37+
commit_message: "✅ Ready to clone and code."
38+
push_options: --force
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
# vim:sw=2:ts=2:sts=2:et
3+
while getopts a:n:u: flag
4+
do
5+
case "${flag}" in
6+
a) owner=${OPTARG};;
7+
n) name=${OPTARG};;
8+
u) url=${OPTARG};;
9+
*) echo "Invalid flag: ${flag}"; exit 1;;
10+
esac
11+
done
12+
13+
echo "Owner: $owner";
14+
echo "Repository Name: $name";
15+
echo "Repository URL: $url";
16+
17+
echo "Renaming repository..."
18+
19+
original_owner="{{REPOSITORY_OWNER}}"
20+
original_name="{{REPOSITORY_NAME}}"
21+
original_url="{{REPOSITORY_URL}}"
22+
for filename in $(git ls-files)
23+
do
24+
sed -i "s/$original_owner/$owner/g" "$filename"
25+
sed -i "s/$original_name/$name/g" "$filename"
26+
sed -i "s/$original_url/$url/g" "$filename"
27+
echo "Renamed $filename"
28+
done
29+
30+
# This command runs only once on GHA!
31+
rm -f .github/workflows/rename_template.yml
32+
rm -rf .github/workflows/scripts

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Any private crt and keys #
2+
############################
3+
*.crt
4+
*.key
5+
*~
6+
\#*
7+
8+
# OS Specific #
9+
###############
10+
Thumbs.db
11+
.DS_Store
12+
.vscode
13+
14+
# Logs #
15+
########
16+
*.log

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
## 1.0.0 (Month Date, Year)
4+
5+
Initial release of the NGINX template repository.

CODE_OF_CONDUCT.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8+
9+
## Our Standards
10+
11+
Examples of behavior that contributes to a positive environment for our community include:
12+
13+
- Demonstrating empathy and kindness toward other people
14+
- Being respectful of differing opinions, viewpoints, and experiences
15+
- Giving and gracefully accepting constructive feedback
16+
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17+
- Focusing on what is best not just for us as individuals, but for the overall community
18+
19+
Examples of unacceptable behavior include:
20+
21+
- The use of sexualized language or imagery, and sexual attention or advances of
22+
any kind
23+
- Trolling, insulting or derogatory comments, and personal or political attacks
24+
- Public or private harassment
25+
- Publishing others' private information, such as a physical or email address, without their explicit permission
26+
- Other conduct which could reasonably be considered inappropriate in a professional setting
27+
28+
## Enforcement Responsibilities
29+
30+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
31+
32+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
33+
34+
## Scope
35+
36+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
37+
38+
## Enforcement
39+
40+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at <[email protected]>. All complaints will be reviewed and investigated promptly and fairly.
41+
42+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
43+
44+
## Enforcement Guidelines
45+
46+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
47+
48+
### 1. Correction
49+
50+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
51+
52+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
53+
54+
### 2. Warning
55+
56+
**Community Impact**: A violation through a single incident or series of actions.
57+
58+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
59+
60+
### 3. Temporary Ban
61+
62+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
63+
64+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
65+
66+
### 4. Permanent Ban
67+
68+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
69+
70+
**Consequence**: A permanent ban from any sort of public interaction within the community.
71+
72+
## Attribution
73+
74+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at <https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.
75+
76+
Community Impact Guidelines were inspired by
77+
[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/inclusion).
78+
79+
For answers to common questions about this code of conduct, see the FAQ at <https://www.contributor-covenant.org/faq>. Translations are available at <https://www.contributor-covenant.org/translations>.

CONTRIBUTING.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Contributing Guidelines
2+
3+
The following is a set of guidelines for contributing to this project. We really appreciate that you are considering contributing!
4+
5+
#### Table Of Contents
6+
7+
[Getting Started](#getting-started)
8+
9+
[Contributing](#contributing)
10+
11+
[Code Guidelines](#code-guidelines)
12+
13+
[Code of Conduct](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}}/blob/main/CODE_OF_CONDUCT.md)
14+
15+
## Getting Started
16+
17+
Follow our [Getting Started Guide](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}}/blob/main/README.md#Getting-Started) to get this project up and running.
18+
19+
<!-- ### Project Structure (OPTIONAL) -->
20+
21+
## Contributing
22+
23+
### Report a Bug
24+
25+
To report a bug, open an issue on GitHub with the label `bug` using the available bug report issue template. Please ensure the bug has not already been reported. **If the bug is a potential security vulnerability, please report it using our [security policy](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}}/blob/main/SECURITY.md).**
26+
27+
### Suggest a Feature or Enhancement
28+
29+
To suggest a feature or enhancement, please create an issue on GitHub with the label `enhancement` using the available [feature request template](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}}/blob/main/.github/feature_request_template.md). Please ensure the feature or enhancement has not already been suggested.
30+
31+
### Open a Pull Request
32+
33+
- Fork the repo, create a branch, implement your changes, add any relevant tests, submit a PR when your changes are **tested** and ready for review.
34+
- Fill in [our pull request template](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}}/blob/main/.github/pull_request_template.md).
35+
36+
Note: if you'd like to implement a new feature, please consider creating a [feature request issue](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}}/blob/main/.github/feature_request_template.md) first to start a discussion about the feature.
37+
38+
## Code Guidelines
39+
40+
<!-- ### Go/Python/Bash/etc... Guidelines (OPTIONAL) -->
41+
42+
### Git Guidelines
43+
44+
- Keep a clean, concise and meaningful git commit history on your branch (within reason), rebasing locally and squashing before submitting a PR.
45+
- If possible and/or relevant, use the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) format when writing a commit message, so that changelogs can be automatically generated
46+
- Follow the guidelines of writing a good commit message as described here <https://chris.beams.io/posts/git-commit/> and summarised in the next few points:
47+
- In the subject line, use the present tense ("Add feature" not "Added feature").
48+
- In the subject line, use the imperative mood ("Move cursor to..." not "Moves cursor to...").
49+
- Limit the subject line to 72 characters or less.
50+
- Reference issues and pull requests liberally after the subject line.
51+
- Add more detailed description in the body of the git message (`git commit -a` to give you more space and time in your text editor to write a good message instead of `git commit -am`).

0 commit comments

Comments
 (0)