7 Commits

Author SHA1 Message Date
a6f8a42f97 Geburtstagstermine als Ganztags-Events (VALUE=DATE) erstellen; bestehende Termine werden automatisch migriert
All checks were successful
Build Test Docker Image / docker-test (pull_request) Successful in 1m47s
Run Tests / test (pull_request) Successful in 5m2s
2026-03-28 21:03:48 +01:00
8eb4afc6a1 fix(ci): setup-go von v6 auf v5 downgraden (Node-24-Inkompatibilität mit act_runner) 2026-03-28 20:56:12 +01:00
e3997d8f6f Merge pull request 'fix(ci): Gitea-Release-URL und Token-Typ für GoReleaser ergänzt' (#3) from release-v0.2.2 into master
Some checks failed
Run Tests / test (push) Successful in 4m46s
Make Release / release (push) Failing after 2m1s
Reviewed-on: #3
2026-03-28 16:42:43 +00:00
6757362d8c fix(ci): Gitea-Release-URL und Token-Typ für GoReleaser ergänzt
All checks were successful
Build Test Docker Image / docker-test (pull_request) Successful in 1m21s
Run Tests / test (pull_request) Successful in 4m50s
2026-03-28 17:35:07 +01:00
f4c92fa537 Merge pull request 'release-v0.2.1' (#2) from release-v0.2.1 into master
Some checks failed
Run Tests / test (push) Successful in 4m57s
Make Release / release (push) Failing after 1m58s
Reviewed-on: #2
2026-03-28 16:14:49 +00:00
2498dee918 fix: Gekürzte Docker-Tags (Major, Minor) entfernt, nur noch vollständiges Semver-Tag beibehalten
All checks were successful
Build Test Docker Image / docker-test (pull_request) Successful in 1m27s
Run Tests / test (pull_request) Successful in 4m48s
2026-03-28 17:04:48 +01:00
ebe7e50691 fix(ci): Docker-Login und Build auf CLI umgestellt, Actions-Expressions entfernt 2026-03-28 17:02:30 +01:00
4 changed files with 33 additions and 24 deletions

View File

@@ -27,23 +27,21 @@ jobs:
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o mailcow-birthday-daemon ./cmd/mcbdd
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: git.techniverse.net
username: ${{ gitea.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}
run: echo "${REGISTRY_TOKEN}" | docker login git.techniverse.net -u "${GITHUB_ACTOR}" --password-stdin
env:
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
git.techniverse.net/scriptos/mailcow-birthday-daemon:dev
git.techniverse.net/scriptos/mailcow-birthday-daemon:${{ gitea.sha }}
run: |
IMAGE="git.techniverse.net/scriptos/mailcow-birthday-daemon"
docker build -t "${IMAGE}:dev" -t "${IMAGE}:${GITHUB_SHA}" .
docker push "${IMAGE}:dev"
docker push "${IMAGE}:${GITHUB_SHA}"
- name: Cleanup old SHA-tagged images
if: success()
env:
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: |
API="https://git.techniverse.net/api/v1"
OWNER="scriptos"
@@ -51,7 +49,7 @@ jobs:
KEEP=5
# Fetch all container package versions
RESPONSE=$(curl -s -H "Authorization: token ${{ secrets.REGISTRY_TOKEN }}" \
RESPONSE=$(curl -s -H "Authorization: token ${REGISTRY_TOKEN}" \
"${API}/packages/${OWNER}?type=container&q=${PACKAGE}&limit=50")
# Extract only SHA-tagged versions (40-char hex), sorted newest first
@@ -68,7 +66,7 @@ jobs:
fi
echo "Deleting: ${VERSION:0:12}..."
curl -s -X DELETE \
-H "Authorization: token ${{ secrets.REGISTRY_TOKEN }}" \
-H "Authorization: token ${REGISTRY_TOKEN}" \
"${API}/packages/${OWNER}/container/${PACKAGE}/${VERSION}"
done
echo "Cleanup done. Kept $((COUNT < KEEP ? COUNT : KEEP)) of $COUNT SHA-tagged images."

View File

@@ -15,16 +15,14 @@ jobs:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: git.techniverse.net
username: ${{ gitea.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}
run: echo "${REGISTRY_TOKEN}" | docker login git.techniverse.net -u "${GITHUB_ACTOR}" --password-stdin
env:
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
@@ -34,3 +32,5 @@ jobs:
args: release --clean
env:
GITEA_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
GORELEASER_FORCE_TOKEN: gitea

View File

@@ -26,6 +26,9 @@ checksum:
snapshot:
name_template: "{{ incpatch .Version }}-next"
release:
gitea:
owner: "{{ .Env.REGISTRY_USER }}"
name: mailcow-birthday-daemon
prerelease: auto
changelog:
sort: asc
@@ -41,7 +44,5 @@ upx:
dockers:
- dockerfile: Dockerfile
image_templates:
- "git.techniverse.net/scriptos/mailcow-birthday-daemon:{{ .Major }}"
- "git.techniverse.net/scriptos/mailcow-birthday-daemon:{{ .Major }}.{{ .Minor }}"
- "git.techniverse.net/scriptos/mailcow-birthday-daemon:{{ .Major }}.{{ .Minor }}.{{ .Patch }}"
- "git.techniverse.net/scriptos/mailcow-birthday-daemon:latest"

View File

@@ -197,10 +197,18 @@ func icalMatchesBev(ic *ical.Component, bev birthdayEvent) bool {
if ic.Props.Get(ical.PropSummary) == nil || ic.Props.Get(ical.PropSummary).Value != bev.Summary {
return false
}
if ic.Props.Get(ical.PropDateTimeStart) == nil || ic.Props.Get(ical.PropDateTimeStart).Value != bev.DateTimeStart {
dtStart := ic.Props.Get(ical.PropDateTimeStart)
if dtStart == nil || dtStart.Value != bev.DateTimeStart {
return false
}
if ic.Props.Get(ical.PropDateTimeEnd) == nil || ic.Props.Get(ical.PropDateTimeEnd).Value != bev.DateTimeEnd {
if dtStart.Params.Get(ical.ParamValue) != string(ical.ValueDate) {
return false
}
dtEnd := ic.Props.Get(ical.PropDateTimeEnd)
if dtEnd == nil || dtEnd.Value != bev.DateTimeEnd {
return false
}
if dtEnd.Params.Get(ical.ParamValue) != string(ical.ValueDate) {
return false
}
return true
@@ -216,8 +224,10 @@ func (bev birthdayEvent) generateICAL(calendar string) (string, *ical.Calendar)
event.Props.SetText(ical.PropSummary, bev.Summary)
event.Props.SetDateTime(ical.PropDateTimeStamp, time.Now())
start := ical.NewProp(ical.PropDateTimeStart)
start.SetValueType(ical.ValueDate)
start.Value = bev.DateTimeStart
end := ical.NewProp(ical.PropDateTimeEnd)
end.SetValueType(ical.ValueDate)
end.Value = bev.DateTimeEnd
event.Props.Set(start)
event.Props.Set(end)