Compare commits

..

No commits in common. "master" and "v1.1.0" have entirely different histories.

5 changed files with 2 additions and 80 deletions

View File

@ -1,59 +0,0 @@
name: Build Docker image
on:
push:
branches:
- '*'
tags:
- v*
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
aviortheking/codestats-skyline
tags: |
type=edge
type=ref,event=pr
type=ref,event=branch,prefix=branch-
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=semver,pattern=latest
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Github Packages
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
file: ./Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@ -30,8 +30,6 @@ RUN npm run build
RUN npm ci --omit=dev
ENV NODE_ENV=production
# Expose port
EXPOSE 3000

View File

@ -1,12 +1,5 @@
# Code::Stats Skyline
<a href="https://discord.gg/QNupZ4Ywxf">
<img src="https://img.shields.io/discord/1143555541004726272?color=%235865F2&label=Discord" alt="Discord Link">
</a>
<a href="https://github.com/Aviortheking/codestats-skyline/stargazers">
<img src="https://img.shields.io/github/stars/Aviortheking/codestats-skyline?style=flat-square" alt="Github stars">
</a>
Tool to generate an STL using your Codestats Total XPs
[Based on Github's Skyline](skyline.github.com)

View File

@ -21,12 +21,6 @@ app.get('/', async (req, res) => {
// Generate the STL
const bfr = await generateThingy(username, yearN)
if (!bfr) {
res.status(500)
.send('It seems the generator could not generate, Please open an issue on Github https://github.com/aviortheking/codestats-skyline/issues/new')
return
}
// force download the STL with a good name
res
.setHeader('Content-Disposition', `attachment; filename=${username}-${year ? year : 'full'}.stl`)

View File

@ -60,7 +60,7 @@ export const generateThingy = async (username: string, filterYear?: number): Pro
if (month === '') {
continue
}
correctedData[month] = Array(32).fill(0)
correctedData[month] = Array(31).fill(0)
}
// loop through each dates
@ -102,11 +102,7 @@ export const generateThingy = async (username: string, filterYear?: number): Pro
final += `max = ${max};\n`
final += `min = ${min};\n`
final += `text = "${username}";\n`
final += `year = "${filterYear ?? ''}";\n`
if (process.env.NODE_ENV !== 'production') {
console.log(final)
}
final += `year = ${filterYear};\n`
// Fetch the CAD file
let cadPath = './3d.scad'