From dba95baa8f8241a473025b8e08571ca9b2dddae9 Mon Sep 17 00:00:00 2001 From: dcalixto Date: Mon, 16 Dec 2024 15:32:59 -0300 Subject: [PATCH] The correct command for downloading a gist is gh gist --- .github/workflows/clone-stats-and-badge.yml | 3 +-- README.md | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/clone-stats-and-badge.yml b/.github/workflows/clone-stats-and-badge.yml index fa7d79f..7bad986 100644 --- a/.github/workflows/clone-stats-and-badge.yml +++ b/.github/workflows/clone-stats-and-badge.yml @@ -25,10 +25,9 @@ jobs: env: GIST_ID: ${{ secrets.GIST_ID }} run: | - gh gist get $GIST_ID > previous_clones.json + gh gist view $GIST_ID > previous_clones.json jq -s '.[0] * .[1]' previous_clones.json latest_clones.json > clone.json gh gist edit $GIST_ID clone.json - - name: Push Updated Stats run: | gh api -X PUT repos/${{ github.repository }}/traffic/clones --input clone.json diff --git a/README.md b/README.md index bc263df..c37c5b6 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A Crystal shard for creating human-readable URLs and slugs. FriendlyId lets you [![Crystal Test](https://github.com/dcalixto/friendly_id/actions/workflows/crystal-test.yml/badge.svg?branch=master)](https://github.com/dcalixto/friendly_id/actions/workflows/crystal-test.yml) -![Clone Count](https://img.shields.io/badge/Clones-0-brightgreen) +[![Clone Count](https://github.com/dcalixto/friendly_id/actions/workflows/clone-stats-and-badge.yml/badge.svg?branch=master)](https://github.com/dcalixto/friendly_id/actions/workflows/clone-stats-and-badge.yml) ## Installation