Skip to content

Commit

Permalink
refactor: split pages to separate file; create db-client with all que…
Browse files Browse the repository at this point in the history
…ries
  • Loading branch information
vladkens committed Jul 26, 2024
1 parent 685306f commit 9a17fee
Show file tree
Hide file tree
Showing 7 changed files with 541 additions and 497 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,25 @@ jobs:
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3

- name: build & push
- name: build & push (main)
if: ${{ github.ref == 'refs/heads/main' }}
env:
USERNAME: ${{ github.actor }}
GHCR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo ${GHCR_TOKEN} | docker login ghcr.io -u ${USERNAME} --password-stdin
docker buildx build --push \
--cache-from=type=gha --cache-to=type=gha,mode=max \
--platform linux/amd64 \
-t ghcr.io/${USERNAME}/ghstats:main .
- name: build & push (tag)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
env:
USERNAME: ${{ github.actor }}
GHCR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ref="$(echo ${{ github.ref}} | cut -d'/' -f3)"
echo ${GHCR_TOKEN} | docker login ghcr.io -u ${USERNAME} --password-stdin
docker buildx build --push \
--platform linux/amd64 \
-t ghcr.io/${USERNAME}/ghstats:${ref} -t ghcr.io/${USERNAME}/ghstats:latest .
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 vladkens

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
11 changes: 10 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# ghstats

`ghstats` is open-source & self-hosted dashboard for tracking GitHub repos traffic history longer than 14 days.
[<img src="https://badgen.net/github/release/vladkens/ghstats" alt="version" />](https://github.com/vladkens/ghstats/releases)
[<img src="https://badgen.net/github/license/vladkens/ghstats" alt="license" />](https://github.com/vladkens/ghstats/blob/main/LICENSE)
[<img src="https://badgen.net/static/-/buy%20me%20a%20coffee/ff813f?icon=buymeacoffee&label" alt="donate" />](https://buymeacoffee.com/vladkens)

<div align="center">
Self-hosted dashboard for tracking GitHub repos traffic history longer than 14 days.
<br />
<br />
<img src=".github/ghstats.png" alt="ghstats preview" />
</div>

### Usage

Expand Down
3 changes: 2 additions & 1 deletion src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@
.no-underline { text-decoration: none; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-right { text-align: right; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
Loading

0 comments on commit 9a17fee

Please sign in to comment.