Go back to Django
This commit is contained in:
parent
d7be14f5a2
commit
7eee113cdf
22 changed files with 1481 additions and 172 deletions
64
.github/workflows/docker-publish.yml
vendored
Normal file
64
.github/workflows/docker-publish.yml
vendored
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
name: Test and Build Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
SECRET_KEY: 1234567890
|
||||
DEBUG: True
|
||||
ADMIN_EMAIL: 4153203+TheLovinator1@users.noreply.github.com
|
||||
EMAIL_HOST_USER: ${{ secrets.EMAIL_HOST_USER }}
|
||||
EMAIL_HOST_PASSWORD: ${{ secrets.EMAIL_HOST_PASSWORD }}
|
||||
POSTGRES_PASSWORD: githubtest
|
||||
POSTGRES_HOST: 127.0.0.1
|
||||
POSTGRES_USER: feedvault
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16
|
||||
env:
|
||||
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
|
||||
POSTGRES_HOST: ${{ env.POSTGRES_HOST }}
|
||||
POSTGRES_USER: ${{ env.POSTGRES_USER }}
|
||||
ports:
|
||||
- 5432:5432
|
||||
options: --health-cmd pg_isready --health-interval 1s --health-timeout 5s --health-retries 5
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.12
|
||||
- run: pipx install poetry
|
||||
- run: pipx inject poetry poetry-plugin-export
|
||||
- run: poetry install
|
||||
- run: poetry run python manage.py migrate
|
||||
# - run: poetry run python manage.py test
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
if: github.event_name != 'pull_request'
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
needs: test
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: |
|
||||
ghcr.io/thelovinator1/feedvault:latest
|
||||
14
.github/workflows/ruff.yml
vendored
Normal file
14
.github/workflows/ruff.yml
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
name: Ruff
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: "0 0 * * *" # Run every day
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
ruff:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: chartboost/ruff-action@v1
|
||||
Loading…
Add table
Add a link
Reference in a new issue