Skip to content

Commit 01876ed

Browse files
authored
Merge pull request #326 from lardbit/nefairous-lowercase
Github Actions - runner upgrade
2 parents 81fc95a + 5f571c6 commit 01876ed

File tree

6 files changed

+22
-33
lines changed

6 files changed

+22
-33
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,22 @@ on:
55

66
jobs:
77
build:
8-
runs-on: ubuntu-22.04
8+
runs-on: ubuntu-24.04
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v2
11+
uses: actions/checkout@v4
1212
# https://github.com/docker/setup-qemu-action
1313
- name: Set up QEMU
14-
uses: docker/setup-qemu-action@v1
14+
uses: docker/setup-qemu-action@v3
1515
# https://github.com/docker/setup-buildx-action
1616
- name: Set up Docker Buildx
17-
uses: docker/setup-buildx-action@v1
17+
uses: docker/setup-buildx-action@v3
1818
- name: Login to DockerHub
19-
uses: docker/login-action@v1
19+
uses: docker/login-action@v3
2020
with:
2121
username: ${{ secrets.DOCKER_USERNAME }}
2222
password: ${{ secrets.DOCKER_TOKEN }}
23+
2324
- name: Set tag name
2425
id: tag_name
2526
shell: bash
@@ -33,32 +34,23 @@ jobs:
3334
else
3435
tag="$branch"
3536
fi
36-
echo "##[set-output name=tag;]$(echo ${tag})"
37+
echo "TAG_NAME=$tag" >> $GITHUB_ENV
38+
3739
- name: Build front-end image
3840
run: |
3941
set -e
40-
41-
# get tag name
42-
tag=${{ steps.tag_name.outputs.tag }}
43-
44-
# build front-end app
45-
docker build -t lardbit/nefarious:frontend-$tag -f Dockerfile-frontend .
46-
47-
# push front-end image
48-
docker push lardbit/nefarious:frontend-$tag
42+
docker build -t lardbit/nefarious:frontend-$TAG_NAME -f Dockerfile-frontend .
43+
docker push lardbit/nefarious:frontend-$TAG_NAME
4944
5045
- name: Build and Run tests
5146
run: |
5247
set -e
53-
54-
# get tag name
55-
tag=${{ steps.tag_name.outputs.tag }}
5648
5749
# echo images
5850
docker images
5951
6052
# build back-end app
61-
docker build --build-arg tag=$tag -t lardbit/nefarious:$tag .
53+
docker build --build-arg tag=$TAG_NAME -t lardbit/nefarious:$TAG_NAME .
6254
6355
# create docker network to link containers
6456
docker network create tests
@@ -67,15 +59,12 @@ jobs:
6759
docker run --network tests --name redis --rm -d redis
6860
6961
# run unit tests
70-
docker run --network tests -e REDIS_HOST=redis --entrypoint /env/bin/python lardbit/nefarious:$tag manage.py test
62+
docker run --network tests -e REDIS_HOST=redis --entrypoint /env/bin/python lardbit/nefarious:$TAG_NAME manage.py test
7163
7264
- name: Build multi-arch images and push to registry
7365
run: |
7466
set -e
7567
76-
# get tag name
77-
tag=${{ steps.tag_name.outputs.tag }}
78-
7968
# store git commit in image for version identification
8069
echo "$GITHUB_SHA" > src/.commit
8170
@@ -84,15 +73,15 @@ jobs:
8473
--platform linux/amd64,linux/arm64 \
8574
--output "type=image,push=false" \
8675
--cache-to "type=local,dest=/tmp/.buildx-cache" \
87-
--build-arg tag=$tag \
88-
--tag lardbit/nefarious:${tag} \
76+
--build-arg tag=$TAG_NAME \
77+
--tag lardbit/nefarious:${TAG_NAME} \
8978
--file Dockerfile .
9079
9180
# push image (from cached result)
9281
docker buildx build \
9382
--platform linux/amd64,linux/arm64 \
9483
--output "type=image,push=true" \
9584
--cache-from "type=local,src=/tmp/.buildx-cache" \
96-
--build-arg tag=$tag \
97-
--tag lardbit/nefarious:${tag} \
85+
--build-arg tag=$TAG_NAME \
86+
--tag lardbit/nefarious:$TAG_NAME \
9887
--file Dockerfile .

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# define pre-built frontend app to extract from
22
ARG tag=latest
3-
FROM lardbit/nefarious:frontend-$tag as frontend
3+
FROM lardbit/nefarious:frontend-$tag AS frontend
44

5-
FROM python:3.9.9-bullseye
5+
FROM python:3.9.21-bookworm
66

77
EXPOSE 80
88

src/frontend/src/app/app.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<nav class="navbar navbar-expand-md navbar-dark bg-dark mb-4 px-3">
2-
<a class="navbar-brand" href="#">Nefarious</a>
2+
<a class="navbar-brand" href="#">nefarious</a>
33
<button class="navbar-toggler" type="button" (click)="toggleCollapseNav()" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
44
<span class="navbar-toggler-icon"></span>
55
</button>

src/frontend/src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="description" content="">
77
<meta name="author" content="">
88
<link rel="icon" type="image/png" href="favicon.ico">
9-
<title>Nefarious</title>
9+
<title>nefarious</title>
1010
</head>
1111
<body>
1212
<div class="container">

src/nefarious/management/commands/nefarious-init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
class Command(BaseCommand):
9-
help = 'Initialize Nefarious'
9+
help = 'Initialize nefarious'
1010

1111
def add_arguments(self, parser):
1212
parser.add_argument('username', type=str)

src/nefarious/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def __str__(self):
191191
class WatchTVSeasonRequest(models.Model):
192192
"""
193193
This is a special model for keeping track of a user's request to watch a TV Season.
194-
Nefarious is at the mercy of the data provider (TMDB) which doesn't always have the full episode list at the time of the request.
194+
nefarious is at the mercy of the data provider (TMDB) which doesn't always have the full episode list at the time of the request.
195195
TMDB sometimes only adds listings for episodes as they are published.
196196
The task queue will routinely scan for new episodes for a season that may not have had it's full episode list at the time of
197197
the request to watch the entire season. Essentially, nefarious will re-request a season's episode list to see if it needs to download any new episodes.

0 commit comments

Comments
 (0)