Compare commits

..

7 Commits

Author SHA1 Message Date
fe0068f5ed added condition to run restart step only on main branch
All checks were successful
Build Docker Image / Docker-Build (push) Successful in 2m36s
Build Docker Image / Clean-Registry (push) Successful in 1s
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
2026-01-05 14:13:47 +01:00
e92a4bedb9 working on curl request
All checks were successful
Build Docker Image / Docker-Build (push) Successful in 2m28s
Build Docker Image / Clean-Registry (push) Successful in 2s
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
2026-01-05 14:06:32 +01:00
11d14afb00 working on curl request
Some checks failed
Build Docker Image / Docker-Build (push) Failing after 2m25s
Build Docker Image / Clean-Registry (push) Successful in 2s
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
2026-01-05 14:01:55 +01:00
77e546bd4b fixed typo
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
2026-01-05 13:54:12 +01:00
beb58bbc36 added remote call to restart vj.srsoftware.de
Some checks failed
Build Docker Image / Docker-Build (push) Failing after 2m24s
Build Docker Image / Clean-Registry (push) Successful in 3s
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
2026-01-05 13:52:31 +01:00
b17275a623 dropped workflow branch from trigger list
All checks were successful
Build Docker Image / Docker-Build (push) Successful in 2m40s
Build Docker Image / Clean-Registry (push) Successful in 4s
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
2026-01-03 23:54:41 +01:00
c1adce5a9e overhauling image creation and management
All checks were successful
Build Docker Image / Docker-Build (push) Successful in 2m31s
Build Docker Image / Clean-Registry (push) Successful in 3s
2026-01-03 23:53:20 +01:00
2 changed files with 35 additions and 9 deletions

View File

@@ -14,8 +14,7 @@ jobs:
uses: actions/checkout@v4
- name: Build docker image
run: |
docker build -t umbrella .
run: docker build -t umbrella .
- name: Store tag date
run: |
@@ -41,3 +40,37 @@ jobs:
TAG=$(cat /tmp/tag)
docker push ${{ secrets.REGISTRY_PATH }}/umbrella:${{ gitea.ref_name }}
docker push ${{ secrets.REGISTRY_PATH }}/umbrella:$TAG
- name: Restart vj.srsoftware.de
if: github.ref == 'refs/heads/main'
run: |
curl -X POST -H "Authorization: Bearer ${{ secrets.MAKE_BEARER }}" -d vj_start https://make.srsoftware.de/launch
Clean-Registry:
runs-on: ubuntu-latest
steps:
- name: Get tag list
run: |
TAGS="$(curl -s -u "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASS }}" https://${{ secrets.REGISTRY_PATH }}/v2/umbrella/tags/list | jq -r ".tags[]")"
COUNT=$(echo "$TAGS" | wc -l)
if [ $COUNT -gt 10 ]; then
REMAIN=$((COUNT - 10))
echo "$TAGS" | head -n $REMAIN > /tmp/old_tags
else
echo less than 10 tags, skipping cleanup
echo "" > /tmp/old_tags
fi
- name: Remove tags
run: |
cat /tmp/old_tags | while read TAG; do
if [ -n "$TAG" ]; then
DIGEST=$(curl -u "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASS }}" -sS -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' -o /dev/null -w '%header{Docker-Content-Digest}' https://${{ secrets.REGISTRY_PATH }}/v2/umbrella/manifests/$TAG)
if [ -n "$DIGEST" ]; then
echo about to delete $TAG
curl -u "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASS }}" -sS -X DELETE https://${{ secrets.REGISTRY_PATH }}/v2/umbrella/manifests/$DIGEST
else
echo failed to get digest for $TAG
fi
fi
done

View File

@@ -8,9 +8,6 @@ WORKDIR /home/svelte/Umbrella/frontend
RUN npm install && npm run build
FROM alpine AS java_build
RUN apk add bash git gradle fontconfig font-opensans openjdk21-jre
ADD . /Umbrella
@@ -19,9 +16,6 @@ COPY --from=svelte_build /home/svelte/Umbrella/frontend/dist web/src/main/resour
RUN gradle --no-daemon build
FROM alpine
RUN apk add bash fontconfig font-opensans graphviz openjdk21-jre weasyprint
RUN adduser -D umbrella
@@ -33,4 +27,3 @@ WORKDIR /home/umbrella
RUN mkdir .config && ln -s /host/config.json .config/Umbrella.json
EXPOSE 80
CMD java -jar jar/backend.jar