Skip to content

Commit

Permalink
sync missing versions to dockerhub regularly
Browse files Browse the repository at this point in the history
  • Loading branch information
mbenabda authored and Mehdi BEN ABDALLAH committed Feb 1, 2022
1 parent d851a57 commit 8b5d2a8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/sync_missing_versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *' # at 00:00 on 1st day of month
jobs:
sync_missing_versions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Sync missing versions
run: make sync_missing_versions

7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ sync_missing_versions:
NEXT_PAGE=$$(cat $$TMP/page.json | jq -rM '.next'); \
done; \
\
grep -v -x -f "$$TMP/promtool.tags" "$$TMP/prometheus.tags" > "$$TMP/missing.tags"; \
grep -v -x -f blacklist.tags "$$TMP/missing.tags" > "$$TMP/filtered_missing.tags"; \
(grep -v -x -f "$$TMP/promtool.tags" "$$TMP/prometheus.tags" > "$$TMP/missing.tags") || true; \
(grep -v -x -f blacklist.tags "$$TMP/missing.tags" > "$$TMP/filtered_missing.tags") || true; \
touch "$$TMP/filtered_missing.tags"; \
cat "$$TMP/filtered_missing.tags" | sort | xargs -I{} -n1 bash -c "make sync PROMTOOL_VERSION={}"; \

0 comments on commit 8b5d2a8

Please sign in to comment.