Skip to content

Commit 144610f

Browse files
committed
init
0 parents  commit 144610f

Some content is hidden

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

87 files changed

+8649
-0
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: Cyclenerd

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: 'Bug: Good title'
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Contact me on Mastodon
4+
url: https://fosstodon.org/@cyclenerd
5+
about: Feel free to follow me on Mastodon and send me a message
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: 'Feature request: Good title'
5+
labels: 'enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
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+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
First off, thanks for taking the time to contribute!
2+
3+
## Please Complete the Following
4+
5+
- [ ] I read [CONTRIBUTING.md](https://github.com/Cyclenerd/aws-pricing/blob/master/CONTRIBUTING.md)
6+
7+
## Notes
8+
9+
Feel free to put whatever you want here.

.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"

.github/workflows/build.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: "Build"
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '45 4 * * 5' # At 04:45 on Friday
7+
8+
env:
9+
AWS_REGION : "us-east-1"
10+
AWS_ROLE: ${{ secrets.AWS_ROLE }}
11+
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
12+
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
13+
R2_API_ENDPOINT: ${{ secrets.R2_API_ENDPOINT }}
14+
15+
jobs:
16+
website:
17+
name: Website
18+
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md
19+
runs-on: ubuntu-latest
20+
21+
# Add "id-token" for AWS authentication
22+
permissions:
23+
id-token: write # This is required for requesting the JWT
24+
25+
steps:
26+
- name: 🐧 Install dependencies
27+
run: |
28+
sudo apt-get install \
29+
libdbd-sqlite3-perl \
30+
libjson-xs-perl \
31+
libplack-perl \
32+
libtemplate-perl \
33+
libtext-csv-perl \
34+
rclone \
35+
sqlite3
36+
37+
- name: 🛎️ Checkout
38+
uses: actions/checkout@v4
39+
40+
# Configure AWS Credentials for GitHub Actions
41+
# https://github.com/marketplace/actions/configure-aws-credentials-action-for-github-actions
42+
- id: auth
43+
name: 🔐 Authenticate to AWS
44+
uses: aws-actions/configure-aws-credentials@v4
45+
with:
46+
role-to-assume: ${{ env.AWS_ROLE }}
47+
aws-region: ${{ env.AWS_REGION }}
48+
49+
- name: 🔨 Run build script
50+
run: |
51+
cd build || exit 9
52+
bash build.sh || exit 9
53+
54+
- name: 📑 Create website
55+
run: |
56+
cd build || exit 9
57+
perl web.pl || exit 9
58+
59+
- name: 🧪 Tests
60+
run: |
61+
cat "web/eu-central-1.html" | grep "Frankfurt" || exit 9
62+
jq -e '.[] | .instanceType' "web/instances-locations.json" | grep "t3.medium" || exit 9
63+
64+
- name: 🪣 Publish website
65+
run: |
66+
mkdir -p "$HOME/.config/rclone" || exit 9
67+
echo "[r2]" > "$HOME/.config/rclone/rclone.conf" || exit 9
68+
echo "type = s3" >> "$HOME/.config/rclone/rclone.conf"
69+
echo "provider = Cloudflare" >> "$HOME/.config/rclone/rclone.conf"
70+
echo "access_key_id = $R2_ACCESS_KEY_ID" >> "$HOME/.config/rclone/rclone.conf"
71+
echo "secret_access_key = $R2_SECRET_ACCESS_KEY" >> "$HOME/.config/rclone/rclone.conf"
72+
echo "endpoint = $R2_API_ENDPOINT" >> "$HOME/.config/rclone/rclone.conf"
73+
echo "acl = private" >> "$HOME/.config/rclone/rclone.conf"
74+
echo "no_check_bucket = true" >> "$HOME/.config/rclone/rclone.conf"
75+
rclone copy --transfers 128 --checkers 256 --fast-list "web/" "r2:aws-pricing/" || exit 9

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/web/**
2+
/build/import/**
3+
/build/*.csv
4+
/build/*.txt
5+
!/build/sap-hana.csv
6+
!/build/sap.csv
7+
/build/*.gz
8+
/build/*.json
9+
/build/*.yml
10+
/build/*.conf
11+
/build/*.db
12+
/build/*.db-journal
13+
/build/aws-instances-locations.sql
14+
.~lock*

CODE_OF_CONDUCT.md

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

CONTRIBUTING.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Contributing to the Project
2+
3+
Thank you for considering contributing to our project! Your help and involvement are highly appreciated.
4+
This guide will help you get started with the contribution process.
5+
6+
## Table of Contents
7+
8+
1. [Fork the Repository](#fork-the-repository-)
9+
2. [Clone Your Fork](#clone-your-fork-)
10+
3. [Create a New Branch](#create-a-new-branch-)
11+
4. [Submitting Changes](#submitting-changes-)
12+
5. [Create a Pull Request](#create-a-pull-request-)
13+
6. [Coding Style](#coding-style-)
14+
7. [Keep It Simple](#keep-it-simple-)
15+
16+
## Fork the Repository 🍴
17+
18+
Start by forking the repository. You can do this by clicking the "Fork" button in the
19+
upper right corner of the repository page. This will create a copy of the repository
20+
in your GitHub account.
21+
22+
## Clone Your Fork 📥
23+
24+
Clone your newly created fork of the repository to your local machine with the following command:
25+
26+
```bash
27+
git clone https://github.com/your-username/aws-pricing.git
28+
```
29+
30+
## Create a New Branch 🌿
31+
32+
Create a new branch for the specific issue or feature you are working on.
33+
Use a descriptive branch name:
34+
35+
```bash
36+
git checkout -b "feature-or-issue-name"
37+
```
38+
39+
## Submitting Changes 🚀
40+
Make your desired changes to the codebase.
41+
42+
Stage your changes using the following command:
43+
44+
```bash
45+
git add .
46+
```
47+
48+
Commit your changes with a clear and concise commit message:
49+
50+
```bash
51+
git commit -m "A brief summary of the commit."
52+
```
53+
54+
## Create a Pull Request 🌟
55+
56+
Go to your forked repository on GitHub and click on the "New Pull Request" button.
57+
This will open a new pull request to the original repository.
58+
59+
## Coding Style 📝
60+
61+
Start reading the code, and you'll get the hang of it. It is optimized for readability:
62+
63+
- Shell variables must be uppercase and should begin with `MY_`.
64+
- Functions must be lowercase.
65+
- Check your shell scripts with ShellCheck before submitting.
66+
- Please use tabs to indent.
67+
68+
## Keep It Simple 👍
69+
70+
Simplicity is key. When making changes, aim for clean, easy-to-understand code that benefits all users.
71+
72+
Thank you for your contribution! ❤️

0 commit comments

Comments
 (0)