Compare commits
9 Commits
feature/wo
...
1187956625
| Author | SHA1 | Date | |
|---|---|---|---|
| 1187956625 | |||
| fe0068f5ed | |||
| e92a4bedb9 | |||
| 11d14afb00 | |||
| 77e546bd4b | |||
| beb58bbc36 | |||
| dddba981c0 | |||
| b17275a623 | |||
| c1adce5a9e |
@@ -14,19 +14,19 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build docker image
|
||||
run: |
|
||||
docker build -t umbrella .
|
||||
run: docker build -t umbrella .
|
||||
|
||||
- name: Store tag date
|
||||
run: |
|
||||
DATE=$(date +%Y%m%d_%H%M)
|
||||
echo $DATE | tee /tmp/date
|
||||
TAG=$(date +%Y%m%d_%H%M)_${{ gitea.ref_name }}
|
||||
echo $TAG > /tmp/tag
|
||||
echo Using '"'$TAG'"' as tag.
|
||||
|
||||
- name: Tag image for upload
|
||||
run: |
|
||||
DATE=$(cat /tmp/date)
|
||||
TAG=$(cat /tmp/tag)
|
||||
docker tag umbrella ${{ secrets.REGISTRY_PATH }}/umbrella:${{ gitea.ref_name }}
|
||||
docker tag umbrella ${{ secrets.REGISTRY_PATH }}/umbrella:$DATE_${{ gitea.ref_name }}
|
||||
docker tag umbrella ${{ secrets.REGISTRY_PATH }}/umbrella:$TAG
|
||||
|
||||
- name: Login to registry
|
||||
uses: docker/login-action@v2
|
||||
@@ -37,6 +37,40 @@ jobs:
|
||||
|
||||
- name: Push to registry
|
||||
run: |
|
||||
DATE=$(cat /tmp/date)
|
||||
TAG=$(cat /tmp/tag)
|
||||
docker push ${{ secrets.REGISTRY_PATH }}/umbrella:${{ gitea.ref_name }}
|
||||
docker push ${{ secrets.REGISTRY_PATH }}/umbrella:$DATE_${{ 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,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
|
||||
|
||||
|
||||
@@ -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).map(time => ({
|
||||
let sortedTimes = $derived.by(() => Object.values(times).filter(match_prj_filter).map(time => ({
|
||||
...time,
|
||||
start: display(time.start_time),
|
||||
end: display(time.end_time),
|
||||
@@ -52,6 +52,7 @@
|
||||
}
|
||||
|
||||
function calcYearMap(){
|
||||
console.log('calcYearMap called');
|
||||
let result = {
|
||||
months : {},
|
||||
years : {}
|
||||
@@ -123,7 +124,7 @@
|
||||
function match_prj_filter(time){
|
||||
if (!project_filter) return true;
|
||||
for (var tid of time.task_ids){
|
||||
if (project_filter == tasks[tid].project_id) return true;
|
||||
if (tasks[tid] && project_filter == tasks[tid].project_id) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -258,7 +259,6 @@
|
||||
</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,7 +321,6 @@
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/if}
|
||||
{/each}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user