Compare commits
2 Commits
014f1f5016
...
7ba16f7132
| Author | SHA1 | Date | |
|---|---|---|---|
|
7ba16f7132
|
|||
|
51bbeb82c1
|
@@ -12,11 +12,12 @@ steps:
|
|||||||
repo: docker.asperti.com/paspo/hassio-auto-backup
|
repo: docker.asperti.com/paspo/hassio-auto-backup
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- 0.1.2
|
- ${DRONE_TAG}
|
||||||
|
- ${DRONE_SEMVER_MAJOR}.${DRONE_SEMVER_MINOR}
|
||||||
|
force_tag: true
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
- push
|
|
||||||
|
|||||||
@@ -43,5 +43,5 @@ FIRST_SLUG_TO_DELETE=$(echo "1 + $NUM_BACKUPS" | bc)
|
|||||||
echo $CURRENT_BACKUPS | jq --raw-output ".data.backups | sort_by(.date) | reverse[] | select(.slug != \"$SLUG\") | select (.protected==false) | .slug " | tail -n +$FIRST_SLUG_TO_DELETE | while read SLUG_TO_DELETE
|
echo $CURRENT_BACKUPS | jq --raw-output ".data.backups | sort_by(.date) | reverse[] | select(.slug != \"$SLUG\") | select (.protected==false) | .slug " | tail -n +$FIRST_SLUG_TO_DELETE | while read SLUG_TO_DELETE
|
||||||
do
|
do
|
||||||
echo "Removing backup $SLUG_TO_DELETE"
|
echo "Removing backup $SLUG_TO_DELETE"
|
||||||
curl -s -H "X-HASSIO-KEY: $HASSIO_TOKEN" -X POST http://hassio/backups/$SLUG_TO_DELETE/remove
|
curl -s -H "X-HASSIO-KEY: $HASSIO_TOKEN" -X DELETE http://hassio/backups/$SLUG_TO_DELETE
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Auto Backup",
|
"name": "Auto Backup",
|
||||||
"url": "https://git.asperti.com/paspo/hassio-addons",
|
"url": "https://git.asperti.com/paspo/hassio-addons",
|
||||||
"version": "0.2.0",
|
"version": "0.2.1",
|
||||||
"slug": "auto-backup",
|
"slug": "auto-backup",
|
||||||
"description": "Take hassio backups with fixed timings and manage retention",
|
"description": "Take hassio backups with fixed timings and manage retention",
|
||||||
"startup": "application",
|
"startup": "application",
|
||||||
|
|||||||
Reference in New Issue
Block a user