diff --git a/.github/workflows/count_loc.yml b/.github/workflows/count_loc.yml index 17b1c3c..20bc6b1 100644 --- a/.github/workflows/count_loc.yml +++ b/.github/workflows/count_loc.yml @@ -13,17 +13,15 @@ jobs: packages: write steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Count lines of code - id: loc + - uses: actions/checkout@v3 + - id: loc + name: Count lines of code uses: Sh1nku/count-loc-action@v1 with: - excluded: '*.json,*.svg,*.md,*.toml' - - - name: Update badge - uses: Sh1nku/update-badgestore-badge-action@v1 + excluded: "*.json,*.svg,*.md" + - uses: Sh1nku/badgestore-update-badge-action@v1 + name: Update badge + id: badge with: - right-label: ${{ steps.loc.outputs.sum }} - read-write-key: ${{ secrets.BADGE_AUTH }} + right-label: ${{ steps.loc.outputs.Total_code }} + read-write-key: ${{ secrets.BADGESTORE_RW_KEY }} diff --git a/README.md b/README.md index 1eb0d7b..709800a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Badgestore -![Lines of Code badge]() +![Lines of Code badge](https://api.badgestore.dev/badge/108db75934eb5ec0/local) This is the front-end and back-end for [badgestore.dev](https://badgestore.dev). The website allows you to create badges, and update them. @@ -14,7 +14,7 @@ The front-end is written in [Svelte](https://svelte.dev) and the back-end is wri ## How to use ### Creating a badge #### Using the website -To create a badge, go to [badgestore.dev](https://badgestore.dev) and click on the `Generate badge` button. +To create a badge, go to [badgestore.dev](https://badgestore.dev) and click on the `Generate` button. #### Using the API Take a look at [api.badgestore.dev](https://api.badgestore.dev) ### Updating a badge diff --git a/back_end/src/api/routes/badge_get.rs b/back_end/src/api/routes/badge_get.rs index 438f5b4..640684d 100644 --- a/back_end/src/api/routes/badge_get.rs +++ b/back_end/src/api/routes/badge_get.rs @@ -200,5 +200,8 @@ pub fn svg_response(svg: &str) -> impl IntoResponse { header::CONTENT_TYPE, HeaderValue::from_static("image/svg+xml"), ); + response + .headers_mut() + .insert(header::CACHE_CONTROL, HeaderValue::from_static("no-cache")); response.into_response() }