Skip to content

Commit 5f14b5b

Browse files
[feature] Update Borgmatic image detection (#55)
1 parent 1e73733 commit 5f14b5b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
id: buildx
8181
uses: docker/setup-buildx-action@v3.0.0
8282

83-
- name: Login to Docker Hub
83+
- name: Login to GHCR
8484
uses: docker/login-action@v3
8585
with:
8686
registry: ${{ env.REGISTRY }}
@@ -91,7 +91,7 @@ jobs:
9191
if: ${{ env.BORGMATIC_IMAGE_VERSION == 'latest' }}
9292
id: borgmatic-version
9393
run: |
94-
LATEST_VERSION=$(curl -s https://api.github.com/repos/borgmatic-collective/borgmatic/tags | jq -r '.[].name' | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n 1 )
94+
LATEST_VERSION=$(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s https://api.github.com/orgs/borgmatic-collective/packages/container/borgmatic/versions | jq -r '[.[] | .metadata.container.tags[]? | select(test("^[0-9]+\\.[0-9]+\\.[0-9]+$"))] | unique | sort_by(split(".") | map(tonumber)) | last' )
9595
echo "BORGMATIC_IMAGE_VERSION=$LATEST_VERSION" >> $GITHUB_ENV
9696
9797
# https://github.com/marketplace/actions/docker-metadata-action

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![Super-Linter](https://github.com/maxim-mityutko/borgmatic-exporter/actions/workflows/build.yml/badge.svg)
44
![GitHub last commit (branch)](https://img.shields.io/github/last-commit/maxim-mityutko/borgmatic-exporter/master)
5-
![Static Badge](https://img.shields.io/badge/Borgmatic%20Image-v2.0.7-green)
5+
![Static Badge](https://img.shields.io/badge/Borgmatic%20Image-v2.0.12-green)
66

77
**Borgmatic Exporter** seamlessly integrates Prometheus metrics and Borgmatic. This project is based on
88
the [borg-exporter](https://github.com/danihodovic/borg-exporter) by [@danihodovic](https://github.com/danihodovic),

0 commit comments

Comments
 (0)