refactor: major overhaul and cleanup of the build environment

- Removed `.env.sample` and improved `.env` handling
- Deleted `translate.py` and replaced it with `translate-md.py`
- Refactored `readme.yml` to enhance translation and tagging workflow
- Updated `.gitignore` with new exclusions
- Major restructuring of `Dockerfile`, including improved ENV variables and layout
- Extended `create-env.sh` with interactive prompts and validation
- Improved error handling and structure in `docker-compose-wrapper`
- Expanded `docker-compose.yml` with new environment variables and network settings
- Moved and updated `init.sh`, `.bashrc`, and other files to `files/` directory
- Added new scripts: `show-env.sh` for better diagnostics and `terminal-splash.txt` for enhanced display

These changes optimize the build environment for improved stability and flexibility.
This commit is contained in:
2025-02-11 18:20:58 +01:00
parent f823e7e8ee
commit 7ab5a410d3
12 changed files with 818 additions and 371 deletions

View File

@@ -1,11 +1,17 @@
name: Translate README
name: Translate README and tag repository
on:
push:
branches:
- master
paths:
- 'README-de.md'
- 'README_de.md'
- 'create-env.sh'
- 'docker-compose-wrapper'
- 'docker-compose.yml'
- 'Dockerfile'
paths-ignore:
- '.github/**'
permissions:
contents: write
@@ -16,27 +22,66 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: 3.x
- name: Install dependencies
- name: Install translate dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade googletrans==3.1.0a0
curl -o translate-md.py https://raw.githubusercontent.com/dbt1/translate-md/refs/heads/master/translate-md.py
chmod 755 translate-md.py
curl -o translate-md-config.json https://raw.githubusercontent.com/dbt1/translate-md/refs/heads/master/translate-md-config.json.sample
- name: Verify translate-md.py download
run: |
if [ ! -f translate-md.py ]; then
echo "translate-md.py was not downloaded!"
exit 1
fi
- name: Translate README
run: |
python .github/scripts/translate.py
cp README_de.md template.md
python translate-md.py --template-md template.md --output-dir . --prefix README_ --main-doc README.md -c translate-md-config.json -s de
rm template.md
- name: Prepare Git user data
run: |
git config --global user.email "dbt@novatux.de"
git config --global user.name "Thilo Graf"
- name: Commit and push translated README
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git add README-en.md
git add README*.md
git commit -m "readme: Automatically translated README"
git push
- name: Install tagit dependencies
run: |
pip install GitPython
curl -o tagit.py https://raw.githubusercontent.com/dbt1/tagit/master/tagit.py
curl -o tagit-config.json https://raw.githubusercontent.com/dbt1/tagit/master/tagit-config.json
chmod +x tagit.py
- name: Verify tagit.py download
run: |
if [ ! -f tagit.py ]; then
echo "tagit.py was not downloaded!"
exit 1
fi
- name: Tagging
run: |
python tagit.py -f Makefile
- name: Commit and push version and tag changes
run: |
git add Makefile
git commit -m "tagging: Automatically updated tags [skip ci]" || echo "No changes to commit"
git push
git push --tags