Skip to content

Commit 19d0e39

Browse files
authored
Merge pull request #1 from httpdss/init
Init
2 parents c5d8c6e + 1b2248d commit 19d0e39

16 files changed

Lines changed: 252 additions & 22 deletions

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
OPENAI_API_KEY=your-api-key-here

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
patreon: structproject
2+
custom: ['https://www.paypal.me/httpdss']

.github/release-drafter.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name-template: 'v$RESOLVED_VERSION 🌈'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
categories:
4+
- title: '🚀 Features'
5+
labels:
6+
- 'feature'
7+
- 'enhancement'
8+
- title: '🐛 Bug Fixes'
9+
labels:
10+
- 'fix'
11+
- 'bugfix'
12+
- 'bug'
13+
- title: '🧰 Maintenance'
14+
label: 'chore'
15+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
16+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
17+
version-resolver:
18+
major:
19+
labels:
20+
- 'major'
21+
minor:
22+
labels:
23+
- 'minor'
24+
patch:
25+
labels:
26+
- 'patch'
27+
default: patch
28+
template: |
29+
## Changes
30+
31+
$CHANGES

.github/workflows/pre-commit.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
pre-commit:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-python@v5
15+
- uses: pre-commit/action@v3.0.1
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: push-to-registry
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
7+
env:
8+
REGISTRY: ghcr.io
9+
IMAGE_NAME: ${{ github.repository }}
10+
11+
jobs:
12+
build-and-push-image:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
attestations: write
18+
id-token: write
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Log in to the Container registry
25+
uses: docker/login-action@v3
26+
with:
27+
registry: ${{ env.REGISTRY }}
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Extract metadata (tags, labels) for Docker
32+
id: meta
33+
uses: docker/metadata-action@v5
34+
with:
35+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
36+
37+
- name: Build and push Docker image
38+
id: push
39+
uses: docker/build-push-action@v5
40+
with:
41+
context: .
42+
push: true
43+
tags: ${{ steps.meta.outputs.tags }}
44+
labels: ${{ steps.meta.outputs.labels }}
45+
46+
- name: Generate artifact attestation
47+
uses: actions/attest-build-provenance@v1
48+
with:
49+
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
50+
subject-digest: ${{ steps.push.outputs.digest }}
51+
push-to-registry: true
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: release-drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types: [opened, reopened, synchronize]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
update_release_draft:
15+
permissions:
16+
contents: write
17+
pull-requests: write
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: release-drafter/release-drafter@v6
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test-script.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
push:
55
branches:
66
- main
7-
pull_request:
8-
branches:
9-
- main
7+
# pull_request:
8+
# branches:
9+
# - main
1010

1111
jobs:
1212
build:
@@ -17,10 +17,10 @@ jobs:
1717
- name: Checkout repository
1818
uses: actions/checkout@v4
1919

20-
- name: Set up Python 3.10.14
20+
- name: Set up Python 3.10
2121
uses: actions/setup-python@v5
2222
with:
23-
python-version: 3.10.14
23+
python-version: '3.10'
2424
cache: pip
2525

2626
- name: Install dependencies

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
.venv
22
__pycache__
33
*.egg-info
4+
.env
5+
*.log
6+
example_project/

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.6.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,36 @@ Here is an example of a YAML configuration file:
5353
structure:
5454
- README.md:
5555
content: |
56-
# {project_name}
56+
# ${project_name}
5757
This is a template repository.
5858
- script.sh:
5959
permissions: '0777'
6060
content: |
6161
#!/bin/bash
62-
echo "Hello, {author_name}!"
62+
echo "Hello, ${author_name}!"
6363
- LICENSE:
6464
file: https://raw.githubusercontent.com/nishanths/license/master/LICENSE
6565
```
6666
67+
## Development
68+
69+
To get started with development, follow these steps:
70+
71+
1. Clone the repository
72+
2. Create a virtual environment
73+
74+
```sh
75+
python3 -m venv .venv
76+
source .venv/bin/activate
77+
```
78+
79+
3. Install the dependencies
80+
81+
```sh
82+
pip install -r requirements.txt
83+
pip install -r requirements.dev.txt
84+
```
85+
6786
## License
6887

6988
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

0 commit comments

Comments
 (0)