Skip to content

Commit

Permalink
fix borgbackup role; rearrange CI steps a bit in the Test job
Browse files Browse the repository at this point in the history
  • Loading branch information
aine-etke committed Feb 21, 2025
1 parent 3b09adb commit cc5efca
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 15 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,17 @@ jobs:
if [ "$STATUS" -eq 204 ]; then echo "Maintenance run triggered"; else echo "Failed to trigger maintenance run (HTTP $STATUS). If that's expected, you can (locally): docker pull gchr.io/${{ github.repository }}:fresh && docker tag ghcr.io/${{ github.repository }}:fresh ghcr.io/${{ github.repository }}:latest && docker tag ghcr.io/${{ github.repository }}:fresh registry.etke.cc/${{ github.repository }}:latest && docker push ghcr.io/${{ github.repository }}:latest && docker push registry.etke.cc/${{ github.repository }}:latest" && exit 1; fi
# check progress
while true; do STATUS=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: Bearer $TOKEN" "$API/lock"); if [ "$STATUS" -eq 200 ]; then echo "Maintenance is still in progress, retrying in 1 minute..." && sleep 60; elif [ "$STATUS" -eq 204 ]; then echo "Maintenance has been finished"; break; else echo "Failed to check maintenance progress (HTTP $STATUS)" && exit 1; fi; done
# check result
# check notifications
NOTIFICATIONS=$(curl -s -H "Authorization: Bearer $TOKEN" "$API/notifications")
echo "Notifications:"
echo "$NOTIFICATIONS" | jq
ERROR=$(echo "$NOTIFICATIONS" | jq -r --arg date "$(date +%Y-%m-%d)" '[.[] | select(.event_id | startswith("admin-run-maintenance-\($date)"))] | last | select(.error != null) | .error')
if [ -n "$ERROR" ]; then echo -e "Error found in the last maintenance event: $ERROR" && exit 1; else echo "Maintenance finished successfully"; fi
# cleanup notifications
echo "Cleaning up notifications..."
curl -s -X DELETE -H "Authorization: Bearer $TOKEN" "$API/notifications"
# check result
ERROR=$(echo "$NOTIFICATIONS" | jq -r --arg date "$(date +%Y-%m-%d)" '[.[] | select(.event_id | startswith("admin-run-maintenance-\($date)"))] | last | select(.error != null) | .error')
if [ -n "$ERROR" ]; then echo -e "Error found in the last maintenance event: $ERROR" && exit 1; else echo "Maintenance finished successfully"; fi
# done
echo "Finished"
Expand Down
1 change: 1 addition & 0 deletions VERSIONS.diff.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
**Stable Updates Published**

* [Bluesky](https://github.com/mautrix/bluesky): [v0.1.0](https://github.com/mautrix/bluesky/releases/tag/v0.1.0) _new_
* [Fluffychat](https://github.com/krille-chan/fluffychat): [v1.25.0](https://github.com/krille-chan/fluffychat/releases/tag/v1.25.0) -> [v1.25.1](https://github.com/krille-chan/fluffychat/releases/tag/v1.25.1)
2 changes: 1 addition & 1 deletion VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* Exim Relay: 4.98-r0-4
* Facebook: v0.5.1
* Firezone: 0.7.36
* Fluffychat: v1.25.0
* Fluffychat: v1.25.1
* Funkwhale: 1.4.0
* Gmessages: v0.6.0
* Go Neb: latest
Expand Down
6 changes: 3 additions & 3 deletions roles/galaxy/backup_borg/meta/.galaxy_install_info
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
install_date: 'Fri 21 Feb 2025 05:00:59 PM '
install_commit: 02dd1a8d70f573e39d2edecba2dcf7cab5c2dba2
version: v1.4.0-1.9.10-1
install_date: 'Fri 21 Feb 2025 09:10:45 PM '
install_commit: 64ec3d983e3324ff4260dac8f4d96948adfc2e9b
version: v1.4.0-1.9.10-2
7 changes: 0 additions & 7 deletions roles/galaxy/backup_borg/templates/config.yaml.j2
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
{#
SPDX-FileCopyrightText: 2023 Julian-Samuel Gebühr
SPDX-FileCopyrightText: 2023 - 2024 Nikita Chernyi
SPDX-License-Identifier: AGPL-3.0-or-later
#}

#jinja2: lstrip_blocks: "True", trim_blocks: "True"

# location
Expand Down

0 comments on commit cc5efca

Please sign in to comment.