Ready to clone and code.

This commit is contained in:
simon
2026-03-01 15:33:31 +00:00
committed by github-actions[bot]
parent 2410173af1
commit d488434323
10 changed files with 20 additions and 107 deletions

View File

@@ -86,8 +86,8 @@ start() {
echo "New version: $new_version"
gitchangelog | grep -v "[rR]elease:" > HISTORY.md
echo $new_version > project_name/VERSION
git add project_name/VERSION HISTORY.md
echo $new_version > n8n_ollama/VERSION
git add n8n_ollama/VERSION HISTORY.md
git commit -m "release: version $new_version 🚀"
echo "creating git tag : $new_version"
git tag $new_version

View File

@@ -1,38 +0,0 @@
#!/usr/bin/env bash
while getopts a:n:u:d: flag
do
case "${flag}" in
a) author=${OPTARG};;
n) name=${OPTARG};;
u) urlname=${OPTARG};;
d) description=${OPTARG};;
esac
done
echo "Author: $author";
echo "Project Name: $name";
echo "Project URL name: $urlname";
echo "Description: $description";
echo "Renaming project..."
original_author="author_name"
original_name="project_name"
original_urlname="project_urlname"
original_description="project_description"
# for filename in $(find . -name "*.*")
for filename in $(git ls-files)
do
sed -i "s/$original_author/$author/g" $filename
sed -i "s/$original_name/$name/g" $filename
sed -i "s/$original_urlname/$urlname/g" $filename
sed -i "s/$original_description/$description/g" $filename
echo "Renamed $filename"
done
mv project_name $name
# This command runs only once on GHA!
rm -rf .gitea/template.yml
rm -rf project_name
rm -rf project_name.Tests

View File

@@ -1 +0,0 @@
author: rochacbruno

View File

@@ -41,7 +41,7 @@ jobs:
- name: Check version match
run: |
REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_')
if [ "$(cat project_name/VERSION)" = "${GITHUB_REF_NAME}" ] ; then
if [ "$(cat n8n_ollama/VERSION)" = "${GITHUB_REF_NAME}" ] ; then
echo "Version matches successfully!"
else
echo "Version must match!"
@@ -57,5 +57,5 @@ jobs:
run: |
REPOSITORY_OWNER=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $1}' | tr '[:upper:]' '[:lower:]')
REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_')
docker build -t "git.disi.dev/$REPOSITORY_OWNER/project_name:$(cat project_name/VERSION)" -f Containerfile ./
docker push "git.disi.dev/$REPOSITORY_OWNER/project_name:$(cat project_name/VERSION)"
docker build -t "git.disi.dev/$REPOSITORY_OWNER/n8n_ollama:$(cat n8n_ollama/VERSION)" -f Containerfile ./
docker push "git.disi.dev/$REPOSITORY_OWNER/n8n_ollama:$(cat n8n_ollama/VERSION)"

View File

@@ -1,48 +0,0 @@
name: Rename the project from template
on: [push]
permissions: write-all
jobs:
rename-project:
if: ${{ !endsWith (gitea.repository, 'Templates/Docker_Image') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# by default, it uses a depth of 1
# this fetches all history so that we can read each commit
fetch-depth: 0
ref: ${{ gitea.head_ref }}
- run: echo "REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_')" >> $GITHUB_ENV
shell: bash
- run: echo "REPOSITORY_URLNAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}')" >> $GITHUB_ENV
shell: bash
- run: echo "REPOSITORY_OWNER=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $1}')" >> $GITHUB_ENV
shell: bash
- name: Is this still a template
id: is_template
run: echo "::set-output name=is_template::$(ls .gitea/template.yml &> /dev/null && echo true || echo false)"
- name: Rename the project
if: steps.is_template.outputs.is_template == 'true'
run: |
echo "Renaming the project with -a(author) ${{ env.REPOSITORY_OWNER }} -n(name) ${{ env.REPOSITORY_NAME }} -u(urlname) ${{ env.REPOSITORY_URLNAME }}"
.gitea/rename_project.sh -a ${{ env.REPOSITORY_OWNER }} -n ${{ env.REPOSITORY_NAME }} -u ${{ env.REPOSITORY_URLNAME }} -d "Awesome ${{ env.REPOSITORY_NAME }} created by ${{ env.REPOSITORY_OWNER }}"
- name: Remove renaming workflow
if: steps.is_template.outputs.is_template == 'true'
run: |
rm .gitea/workflows/rename_project.yml
rm .gitea/rename_project.sh
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "✅ Ready to clone and code."
# commit_options: '--amend --no-edit'
push_options: --force

View File

@@ -1,15 +1,15 @@
# How to develop on this project
project_name welcomes contributions from the community.
n8n_ollama welcomes contributions from the community.
This instructions are for linux base systems. (Linux, MacOS, BSD, etc.)
## Setting up your own fork of this repo.
- On gitea interface click on `Fork` button.
- Clone your fork of this repo. `git clone git@git.disi.dev:YOUR_GIT_USERNAME/project_urlname.git`
- Enter the directory `cd project_urlname`
- Add upstream repo `git remote add upstream https://git.disi.dev/author_name/project_urlname`
- Clone your fork of this repo. `git clone git@git.disi.dev:YOUR_GIT_USERNAME/n8n_ollama.git`
- Enter the directory `cd n8n_ollama`
- Add upstream repo `git remote add upstream https://git.disi.dev/Artifacts/n8n_ollama`
- initialize repository for use `make setup`
## Install the project in develop mode

View File

@@ -1,6 +1,6 @@
FROM alpine
WORKDIR /app
COPY ./project_name/* /app
COPY ./n8n_ollama/* /app
CMD ["sh", "/app/hello_world.sh"]

View File

@@ -19,24 +19,24 @@ help: ## Show the help.
.PHONY: fmt
fmt: issetup ## Format code using black & isort.
$(ENV_PREFIX)isort project_name/
$(ENV_PREFIX)black -l 79 project_name/
$(ENV_PREFIX)isort n8n_ollama/
$(ENV_PREFIX)black -l 79 n8n_ollama/
$(ENV_PREFIX)black -l 79 tests/
.PHONY: lint
lint: issetup ## Run pep8, black, mypy linters.
$(ENV_PREFIX)flake8 project_name/
$(ENV_PREFIX)black -l 79 --check project_name/
$(ENV_PREFIX)flake8 n8n_ollama/
$(ENV_PREFIX)black -l 79 --check n8n_ollama/
$(ENV_PREFIX)black -l 79 --check tests/
$(ENV_PREFIX)mypy --ignore-missing-imports project_name/
$(ENV_PREFIX)mypy --ignore-missing-imports n8n_ollama/
.PHONY: release
release: issetup ## Create a new tag for release.
@echo "WARNING: This operation will create a version tag and push to gitea"
@read -p "Version? (provide the next x.y.z semver) : " TAG
@echo "$${TAG}" > project_name/VERSION
@echo "$${TAG}" > n8n_ollama/VERSION
@$(ENV_PREFIX)gitchangelog > HISTORY.md
@git add project_name/VERSION HISTORY.md
@git add n8n_ollama/VERSION HISTORY.md
@git commit -m "release: version $${TAG} 🚀"
@echo "creating git tag : $${TAG}"
@git tag $${TAG}
@@ -45,7 +45,7 @@ release: issetup ## Create a new tag for release.
.PHONY: build
build: issetup ## Create a new tag for release.
@docker build -t project_name:$(cat project_name/VERSION) -f Containerfile .
@docker build -t n8n_ollama:$(cat n8n_ollama/VERSION) -f Containerfile .
# This project has been generated from rochacbruno/python-project-template
# __author__ = 'rochacbruno'

View File

@@ -1,6 +1,6 @@
# project_name
# n8n_ollama
project_description
Awesome n8n_ollama created by Artifacts
## Usage