forked from numerique-gouv/sites-faciles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from numerique-gouv/main
Mise en production
- Loading branch information
Showing
55 changed files
with
38,435 additions
and
730 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: 📦 Docker Image Build & Push | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
name: Build and push Docker image | ||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Inject enhanced GitHub environment variables | ||
uses: rlespinasse/github-slug-action@v5 | ||
- name: Login to GHCR | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ github.token }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
push: true | ||
tags: | | ||
ghcr.io/${{ env.GITHUB_REPOSITORY_OWNER_PART_SLUG }}/sites-faciles:${{ env.GITHUB_REF_SLUG }} | ||
${{ github.ref_name == 'main' && format('ghcr.io/{0}/sites-faciles:latest', env.GITHUB_REPOSITORY_OWNER_PART_SLUG) || '' }} | ||
cache-from: type=registry,ref=ghcr.io/${{ env.GITHUB_REPOSITORY_OWNER_PART_SLUG }}/sites-faciles:${{ env.GITHUB_REF_SLUG }} | ||
cache-to: type=inline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: 🔮 CI - Migrations Check | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- ready_for_review | ||
|
||
jobs: | ||
build: | ||
if: github.event.pull_request.draft == false | ||
runs-on: ubuntu-latest | ||
env: | ||
DJANGO_SETTINGS_MODULE: config.settings_test | ||
PYTHONPATH: . | ||
strategy: | ||
matrix: | ||
python-version: ["3.12"] | ||
services: | ||
postgres: | ||
image: postgres:14-alpine | ||
env: | ||
POSTGRES_USER: dju | ||
POSTGRES_PASSWORD: djpwd | ||
POSTGRES_DB: djdb | ||
ports: | ||
- 5432:5432 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: 🐍 Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: 🌍 Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
pip install ruff | ||
poetry install --no-root | ||
- name: 📄 Copy empty .env.test to .env | ||
run: | | ||
cp .env.test .env | ||
- name: 🚧 Check pending migrations | ||
run: | | ||
poetry run django-admin makemigrations --check --dry-run --noinput |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Generated by Django 5.1.3 on 2024-11-27 10:47 | ||
|
||
import django.core.validators | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("blog", "0037_alter_blogentrypage_body_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="blogindexpage", | ||
name="feed_posts_limit", | ||
field=models.PositiveSmallIntegerField( | ||
default=20, | ||
validators=[ | ||
django.core.validators.MaxValueValidator(100), | ||
django.core.validators.MinValueValidator(1), | ||
], | ||
verbose_name="Post limit in the RSS/Atom feeds", | ||
), | ||
), | ||
] |
Oops, something went wrong.