generated from Templates/Docker_Image
✅ Ready to clone and code.
This commit is contained in:
committed by
github-actions[bot]
parent
2410173af1
commit
d488434323
@@ -86,8 +86,8 @@ start() {
|
|||||||
echo "New version: $new_version"
|
echo "New version: $new_version"
|
||||||
|
|
||||||
gitchangelog | grep -v "[rR]elease:" > HISTORY.md
|
gitchangelog | grep -v "[rR]elease:" > HISTORY.md
|
||||||
echo $new_version > project_name/VERSION
|
echo $new_version > n8n_ollama/VERSION
|
||||||
git add project_name/VERSION HISTORY.md
|
git add n8n_ollama/VERSION HISTORY.md
|
||||||
git commit -m "release: version $new_version 🚀"
|
git commit -m "release: version $new_version 🚀"
|
||||||
echo "creating git tag : $new_version"
|
echo "creating git tag : $new_version"
|
||||||
git tag $new_version
|
git tag $new_version
|
||||||
|
|||||||
@@ -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
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
author: rochacbruno
|
|
||||||
@@ -41,7 +41,7 @@ jobs:
|
|||||||
- name: Check version match
|
- name: Check version match
|
||||||
run: |
|
run: |
|
||||||
REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_')
|
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!"
|
echo "Version matches successfully!"
|
||||||
else
|
else
|
||||||
echo "Version must match!"
|
echo "Version must match!"
|
||||||
@@ -57,5 +57,5 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
REPOSITORY_OWNER=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $1}' | tr '[:upper:]' '[:lower:]')
|
REPOSITORY_OWNER=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $1}' | tr '[:upper:]' '[:lower:]')
|
||||||
REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_')
|
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 build -t "git.disi.dev/$REPOSITORY_OWNER/n8n_ollama:$(cat n8n_ollama/VERSION)" -f Containerfile ./
|
||||||
docker push "git.disi.dev/$REPOSITORY_OWNER/project_name:$(cat project_name/VERSION)"
|
docker push "git.disi.dev/$REPOSITORY_OWNER/n8n_ollama:$(cat n8n_ollama/VERSION)"
|
||||||
@@ -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
|
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
# How to develop on this project
|
# 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.)
|
This instructions are for linux base systems. (Linux, MacOS, BSD, etc.)
|
||||||
|
|
||||||
## Setting up your own fork of this repo.
|
## Setting up your own fork of this repo.
|
||||||
|
|
||||||
- On gitea interface click on `Fork` button.
|
- 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`
|
- Clone your fork of this repo. `git clone git@git.disi.dev:YOUR_GIT_USERNAME/n8n_ollama.git`
|
||||||
- Enter the directory `cd project_urlname`
|
- Enter the directory `cd n8n_ollama`
|
||||||
- Add upstream repo `git remote add upstream https://git.disi.dev/author_name/project_urlname`
|
- Add upstream repo `git remote add upstream https://git.disi.dev/Artifacts/n8n_ollama`
|
||||||
- initialize repository for use `make setup`
|
- initialize repository for use `make setup`
|
||||||
|
|
||||||
## Install the project in develop mode
|
## Install the project in develop mode
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM alpine
|
FROM alpine
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY ./project_name/* /app
|
COPY ./n8n_ollama/* /app
|
||||||
|
|
||||||
CMD ["sh", "/app/hello_world.sh"]
|
CMD ["sh", "/app/hello_world.sh"]
|
||||||
16
Makefile
16
Makefile
@@ -19,24 +19,24 @@ help: ## Show the help.
|
|||||||
|
|
||||||
.PHONY: fmt
|
.PHONY: fmt
|
||||||
fmt: issetup ## Format code using black & isort.
|
fmt: issetup ## Format code using black & isort.
|
||||||
$(ENV_PREFIX)isort project_name/
|
$(ENV_PREFIX)isort n8n_ollama/
|
||||||
$(ENV_PREFIX)black -l 79 project_name/
|
$(ENV_PREFIX)black -l 79 n8n_ollama/
|
||||||
$(ENV_PREFIX)black -l 79 tests/
|
$(ENV_PREFIX)black -l 79 tests/
|
||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint: issetup ## Run pep8, black, mypy linters.
|
lint: issetup ## Run pep8, black, mypy linters.
|
||||||
$(ENV_PREFIX)flake8 project_name/
|
$(ENV_PREFIX)flake8 n8n_ollama/
|
||||||
$(ENV_PREFIX)black -l 79 --check project_name/
|
$(ENV_PREFIX)black -l 79 --check n8n_ollama/
|
||||||
$(ENV_PREFIX)black -l 79 --check tests/
|
$(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
|
.PHONY: release
|
||||||
release: issetup ## Create a new tag for release.
|
release: issetup ## Create a new tag for release.
|
||||||
@echo "WARNING: This operation will create a version tag and push to gitea"
|
@echo "WARNING: This operation will create a version tag and push to gitea"
|
||||||
@read -p "Version? (provide the next x.y.z semver) : " TAG
|
@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
|
@$(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} 🚀"
|
@git commit -m "release: version $${TAG} 🚀"
|
||||||
@echo "creating git tag : $${TAG}"
|
@echo "creating git tag : $${TAG}"
|
||||||
@git tag $${TAG}
|
@git tag $${TAG}
|
||||||
@@ -45,7 +45,7 @@ release: issetup ## Create a new tag for release.
|
|||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: issetup ## Create a new tag for release.
|
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
|
# This project has been generated from rochacbruno/python-project-template
|
||||||
# __author__ = 'rochacbruno'
|
# __author__ = 'rochacbruno'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# project_name
|
# n8n_ollama
|
||||||
|
|
||||||
project_description
|
Awesome n8n_ollama created by Artifacts
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user