Compare commits
6 Commits
25dc5fc856
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 8324ecd1e7 | |||
| 0567a1d29b | |||
| f2360cdae8 | |||
| 59245a469d | |||
| ab35e52728 | |||
| d2ce7f0fdc |
@@ -1,7 +1,5 @@
|
|||||||
# This workflow builds and deploys DOStalgia whenever code is pushed to main.
|
# This workflow builds DOStalgia whenever code is pushed to main.
|
||||||
# The runner has Docker socket access so it can manage containers on the host.
|
# The runner has Docker socket access so it can manage containers on the host.
|
||||||
# Parameters match the docker-compose at:
|
|
||||||
# /appdata/dockhand/stacks/unraid/dostalgia/compose.yaml
|
|
||||||
# See: https://docs.gitea.com/usage/actions
|
# See: https://docs.gitea.com/usage/actions
|
||||||
|
|
||||||
name: Build & Deploy
|
name: Build & Deploy
|
||||||
@@ -13,8 +11,6 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
IMAGE_NAME: dostalgia
|
IMAGE_NAME: dostalgia
|
||||||
CONTAINER_NAME: dostalgia
|
|
||||||
DATA_VOLUME: /mnt/cache/appdata/dostalgia
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
@@ -29,34 +25,5 @@ jobs:
|
|||||||
docker build -t ${{ env.IMAGE_NAME }}:${{ gitea.sha }} .
|
docker build -t ${{ env.IMAGE_NAME }}:${{ gitea.sha }} .
|
||||||
docker tag ${{ env.IMAGE_NAME }}:${{ gitea.sha }} ${{ env.IMAGE_NAME }}:latest
|
docker tag ${{ env.IMAGE_NAME }}:${{ gitea.sha }} ${{ env.IMAGE_NAME }}:latest
|
||||||
|
|
||||||
- name: Deploy container
|
|
||||||
run: |
|
|
||||||
docker stop ${{ env.CONTAINER_NAME }} 2>/dev/null || true
|
|
||||||
docker rm ${{ env.CONTAINER_NAME }} 2>/dev/null || true
|
|
||||||
docker run -d \
|
|
||||||
--name ${{ env.CONTAINER_NAME }} \
|
|
||||||
--restart unless-stopped \
|
|
||||||
--network dockernet \
|
|
||||||
-p 8765:8765/tcp \
|
|
||||||
-v ${{ env.DATA_VOLUME }}:/data \
|
|
||||||
-e TWITCH_CLIENT_ID='${{ secrets.TWITCH_CLIENT_ID }}' \
|
|
||||||
-e TWITCH_CLIENT_SECRET='${{ secrets.TWITCH_CLIENT_SECRET }}' \
|
|
||||||
${{ env.IMAGE_NAME }}:latest
|
|
||||||
|
|
||||||
- name: Verify container is running
|
|
||||||
run: |
|
|
||||||
sleep 5
|
|
||||||
STATUS=$(docker inspect -f '{{.State.Status}}' ${{ env.CONTAINER_NAME }})
|
|
||||||
if [ "$STATUS" = "running" ]; then
|
|
||||||
echo "✅ DOStalgia container is running"
|
|
||||||
echo "--- last logs ---"
|
|
||||||
docker logs ${{ env.CONTAINER_NAME }} --tail 5
|
|
||||||
echo "✅ DOStalgia deployed!"
|
|
||||||
else
|
|
||||||
echo "❌ Container status: $STATUS"
|
|
||||||
docker logs ${{ env.CONTAINER_NAME }} --tail 30
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Clean up old images
|
- name: Clean up old images
|
||||||
run: docker image prune -f --filter "until=24h"
|
run: docker image prune -f --filter "until=24h"
|
||||||
|
|||||||
+1
-1
@@ -42,4 +42,4 @@ data/saves/*
|
|||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|
||||||
# Gitea
|
# Gitea
|
||||||
.gitea/
|
.gitea/
|
||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "dostalgia-frontend",
|
"name": "dostalgia-frontend",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "dostalgia-frontend",
|
"name": "dostalgia-frontend",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
||||||
"@testing-library/svelte": "^5.3.1",
|
"@testing-library/svelte": "^5.3.1",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "dostalgia-frontend",
|
"name": "dostalgia-frontend",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 262 KiB After Width: | Height: | Size: 261 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 488 B |
Binary file not shown.
|
After Width: | Height: | Size: 869 B |
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>org.dostalgia</groupId>
|
<groupId>org.dostalgia</groupId>
|
||||||
<artifactId>dostalgia</artifactId>
|
<artifactId>dostalgia</artifactId>
|
||||||
<version>0.1.0</version>
|
<version>0.1.1</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.release>21</maven.compiler.release>
|
<maven.compiler.release>21</maven.compiler.release>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class StaticResource {
|
|||||||
@GET
|
@GET
|
||||||
@jakarta.ws.rs.Path("/api/health")
|
@jakarta.ws.rs.Path("/api/health")
|
||||||
public Response health() {
|
public Response health() {
|
||||||
return Response.ok(Map.of("status", "ok", "version", "0.1.0")).build();
|
return Response.ok(Map.of("status", "ok", "version", "0.1.1")).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
private String guessContentType(String name) {
|
private String guessContentType(String name) {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class StaticResourceTest {
|
|||||||
assertInstanceOf(Map.class, entity);
|
assertInstanceOf(Map.class, entity);
|
||||||
Map<?, ?> map = (Map<?, ?>) entity;
|
Map<?, ?> map = (Map<?, ?>) entity;
|
||||||
assertEquals("ok", map.get("status"));
|
assertEquals("ok", map.get("status"));
|
||||||
assertEquals("0.1.0", map.get("version"));
|
assertEquals("0.1.1", map.get("version"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user