-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
596 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.dockerignore | ||
.git | ||
.github | ||
.gitignore | ||
CONTRIBUTING.md | ||
Dockerfile | ||
pyrightconfig.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Release | ||
run-name: Release ${{ inputs.version || github.ref_name }} | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
required: true | ||
type: string | ||
description: Version (vX.X.X) | ||
env: | ||
VERSION: ${{ inputs.version || github.ref_name }} | ||
jobs: | ||
release-zip: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
env: | ||
RELEASE_ZIP_FILENAME: ${{ github.event.repository.name }}-${{ inputs.version || github.ref_name }}.zip | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Create release ZIP file | ||
run: | | ||
mkdir ${{ github.event.repository.name }} | ||
rm -rf .git .github .gitignore .dockerignore Dockerfile CONTRIBUTING.md pyrightconfig.json | ||
mv * ${{ github.event.repository.name }} || true | ||
zip -r $RELEASE_ZIP_FILENAME ${{ github.event.repository.name }} | ||
- name: Release on GitHub | ||
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 | ||
with: | ||
tag_name: ${{ env.VERSION }} | ||
generate_release_notes: true | ||
files: ${{ env.RELEASE_ZIP_FILENAME }} | ||
release-docker: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
env: | ||
DOCKER_IMAGE_NAME: ghcr.io/${{ github.actor }}/${{ github.event.repository.name }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Sign into GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Build and push Docker images | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
provenance: false | ||
tags: ${{ env.DOCKER_IMAGE_NAME }}:${{ env.VERSION }},${{ env.DOCKER_IMAGE_NAME }}:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
data | ||
Showcase.psd | ||
cache.json | ||
config.json | ||
console.log | ||
lint.bat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM python:3.10-alpine | ||
ARG USERNAME=app | ||
ARG USER_UID=10000 | ||
ARG USER_GID=$USER_UID | ||
RUN addgroup -g $USER_GID $USERNAME && adduser -u $USER_UID -G $USERNAME -D $USERNAME | ||
WORKDIR /app | ||
COPY requirements.txt . | ||
RUN pip install -r requirements.txt --no-cache-dir | ||
COPY . . | ||
ENV IN_CONTAINER true | ||
CMD ["python", "main.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from services import DiscordRpcService | ||
import time | ||
|
||
discordRpcService = DiscordRpcService() | ||
discordRpcService.connect() | ||
discordRpcService.setActivity({ | ||
"details": "details", | ||
"state": "state", | ||
"assets": { | ||
"large_text": "large_text", | ||
"large_image": "logo", | ||
"small_text": "small_text", | ||
"small_image": "playing", | ||
}, | ||
}) | ||
time.sleep(60) |