Compare commits
4 Commits
main
...
feature/wo
| Author | SHA1 | Date | |
|---|---|---|---|
| 8d2f3ef88e | |||
| bd95c3d0c4 | |||
| dceb84669b | |||
| e980dbf884 |
@@ -14,7 +14,8 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build docker image
|
||||
run: docker build -t umbrella .
|
||||
run: |
|
||||
docker build -t umbrella .
|
||||
|
||||
- name: Store tag date
|
||||
run: |
|
||||
@@ -40,37 +41,3 @@ 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
|
||||
|
||||
@@ -8,6 +8,9 @@ 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
|
||||
@@ -16,6 +19,9 @@ 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
|
||||
@@ -27,3 +33,4 @@ WORKDIR /home/umbrella
|
||||
RUN mkdir .config && ln -s /host/config.json .config/Umbrella.json
|
||||
EXPOSE 80
|
||||
CMD java -jar jar/backend.jar
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
let projects = {};
|
||||
let project_filter = $state(null);
|
||||
if (router.hasQueryParam('project')) project_filter = router.getQueryParam('project');
|
||||
let sortedTimes = $derived.by(() => Object.values(times).filter(match_prj_filter).map(time => ({
|
||||
let sortedTimes = $derived.by(() => Object.values(times).map(time => ({
|
||||
...time,
|
||||
start: display(time.start_time),
|
||||
end: display(time.end_time),
|
||||
@@ -52,7 +52,6 @@
|
||||
}
|
||||
|
||||
function calcYearMap(){
|
||||
console.log('calcYearMap called');
|
||||
let result = {
|
||||
months : {},
|
||||
years : {}
|
||||
@@ -124,7 +123,7 @@
|
||||
function match_prj_filter(time){
|
||||
if (!project_filter) return true;
|
||||
for (var tid of time.task_ids){
|
||||
if (tasks[tid] && project_filter == tasks[tid].project_id) return true;
|
||||
if (project_filter == tasks[tid].project_id) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -259,6 +258,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each sortedTimes as time,line}
|
||||
{#if match_prj_filter(time)}
|
||||
<tr class={selected[time.id]?'selected':''}>
|
||||
{#if timeMap.years[line]}
|
||||
<td class="year" rowspan={timeMap.years[line]} onclick={e => toggleRange(time.start.substring(0,4))} title={time.start.substring(0,4)} >
|
||||
@@ -321,6 +321,7 @@
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/if}
|
||||
{/each}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user