Skip to content

Commit

Permalink
Add Release CICD and docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-burwood committed Nov 5, 2024
1 parent 60bcf5c commit 2815572
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release

on:
push:
branches:
- main

permissions:
contents: read
packages: write

jobs:
release:
name: Create GitHub Release

runs-on: ubuntu-latest

permissions:
contents: write

steps:
- uses: actions/checkout@v4

- name: Get Version
run: |
VERSION=$(grep -Po '(?<=version = ")[^"]*' pyproject.toml)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Delete existing release if it exists
run: |
gh release delete ${{ env.VERSION }} -y || echo "Release does not exist, continuing..."
- name: Create GitHub Release
id: create_release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create ${{ env.VERSION }} --title "HomeDB - v${{ env.VERSION }}" --generate-notes
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

HomeDB is a Database for the Home. It is built in Django using a Simple sqlite Database and YAML Configuration Stored Locally in the Filesystem.

![Network Devices Demo Image](image.png)
![Network Devices Demo Image](static/assets/image.png)

## Features

Expand Down
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '3.8'

services:
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
environment:
- DEBUG=True
- ALLOWED_HOSTS=localhost,127.0.0.1
14 changes: 14 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[project]
name = "HomeDB"
version = "1.0"
description = "HomeDB is a Database for the Home."
readme = "README.md"
authors = [
{ name = "Ben Burwood", email = "[email protected]" }
]

[project.urls]
Homepage = "https://github.com/ben-burwood/HomeDB"

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}
File renamed without changes

0 comments on commit 2815572

Please sign in to comment.