-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into prototype/author-pages
- Loading branch information
Showing
21 changed files
with
441 additions
and
223 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,38 @@ | ||
name: Clean up feature branch | ||
|
||
on: | ||
delete: | ||
branches: | ||
- feature/* | ||
|
||
env: | ||
IMAGE_NAME: ds-wagtail | ||
|
||
jobs: | ||
delete: | ||
if: github.event.ref_type == 'branch' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clean up | ||
run: | | ||
IMAGE_ID=$IMAGE_NAME | ||
# Change all uppercase to lowercase | ||
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | ||
# Strip git ref prefix from version | ||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | ||
# Strip "v" prefix from tag name | ||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') | ||
# Use Docker `latest` tag convention | ||
[ "$VERSION" == "main" ] && VERSION=latest | ||
echo IMAGE_ID=$IMAGE_ID | ||
echo VERSION=$VERSION | ||
echo "IMAGE_ID=$IMAGE_ID" >> $GITHUB_ENV | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
echo "Clean up Docker image $IMAGE_ID:$VERSION" | ||
- name: Delete image | ||
uses: bots-house/[email protected] | ||
with: | ||
owner: nationalarchives | ||
name: ${{ env.IMAGE_ID }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ env.VERSION }} |
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 |
---|---|---|
|
@@ -23,11 +23,9 @@ jobs: | |
- uses: hadolint/[email protected] | ||
with: | ||
dockerfile: Dockerfile | ||
- name: Build image | ||
run: docker build --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" --platform=linux/amd64 . | ||
- name: Log in to registry | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin | ||
- name: Push image | ||
- name: Build and push image | ||
run: | | ||
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME | ||
# Change all uppercase to lowercase | ||
|
@@ -40,5 +38,5 @@ jobs: | |
[ "$VERSION" == "main" ] && VERSION=latest | ||
echo IMAGE_ID=$IMAGE_ID | ||
echo VERSION=$VERSION | ||
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION | ||
docker build --tag $IMAGE_ID:$VERSION --platform=linux/amd64 . | ||
docker push $IMAGE_ID:$VERSION |
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
69 changes: 69 additions & 0 deletions
69
etna/articles/migrations/0097_alter_articlepage_mark_new_on_next_publish_and_more.py
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,69 @@ | ||
# Generated by Django 4.2.4 on 2023-08-07 09:14 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("articles", "0096_focusedarticlepage_article_tag_names_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="articlepage", | ||
name="mark_new_on_next_publish", | ||
field=models.BooleanField( | ||
default=True, | ||
help_text="This will set the 'new' label for 21 days", | ||
verbose_name="mark this page as 'new' when published", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="articlepage", | ||
name="newly_published_at", | ||
field=models.DateField( | ||
default=None, | ||
editable=False, | ||
null=True, | ||
verbose_name="Page marked as new on", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="focusedarticlepage", | ||
name="mark_new_on_next_publish", | ||
field=models.BooleanField( | ||
default=True, | ||
help_text="This will set the 'new' label for 21 days", | ||
verbose_name="mark this page as 'new' when published", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="focusedarticlepage", | ||
name="newly_published_at", | ||
field=models.DateField( | ||
default=None, | ||
editable=False, | ||
null=True, | ||
verbose_name="Page marked as new on", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="recordarticlepage", | ||
name="mark_new_on_next_publish", | ||
field=models.BooleanField( | ||
default=True, | ||
help_text="This will set the 'new' label for 21 days", | ||
verbose_name="mark this page as 'new' when published", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="recordarticlepage", | ||
name="newly_published_at", | ||
field=models.DateField( | ||
default=None, | ||
editable=False, | ||
null=True, | ||
verbose_name="Page marked as new on", | ||
), | ||
), | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
flake8==6.0.0 | ||
flake8==6.1.0 | ||
isort==5.12.0 | ||
black==23.7.0 |
Oops, something went wrong.