21 Commits

Author SHA1 Message Date
ee363e065c 1.0.4
All checks were successful
Build a docker image for node-jellyfin-role-bot / build-docker-image (push) Successful in 47s
2023-06-22 23:23:56 +02:00
9af847f234 Fix docker-build for good 2023-06-22 23:23:38 +02:00
a18406e7e4 1.0.3
Some checks failed
Build a docker image for node-jellyfin-role-bot / build-docker-image (push) Failing after 8s
2023-06-22 23:18:41 +02:00
b9f65125dc Hopefully fix ci/cd 2023-06-22 23:18:06 +02:00
d61457cb5f 1.0.2
Some checks failed
Build a docker image for node-jellyfin-role-bot / build-docker-image (push) Failing after 10s
2023-06-22 23:05:47 +02:00
8d0dda0fa9 Merge pull request 'fix/ci-tag' (#47) from fix/ci-tag into master
Reviewed-on: #47
2023-06-22 18:38:34 +02:00
777ae330ad remove master branch restriction on docker-build
All checks were successful
Compile the repository / compile (pull_request) Successful in 10s
since the pipeline is only ever called on a tag, which will by convention only be committed to the master branch, we can be reasonably sure
that we are on the correct branch.
Tags are independent on branches which makes it impossible to check for tag AND master branch ref at the same time.
2023-06-19 23:34:25 +02:00
111ccaa880 simplify the test compile
All checks were successful
Compile the repository / compile (pull_request) Successful in 11s
2023-06-19 23:28:39 +02:00
c00453d3d3 push all tags of an image
All checks were successful
Compile the repository / compile (pull_request) Successful in 11s
2023-06-19 23:26:56 +02:00
8a7973a2e3 compile only on PR 2023-06-19 23:26:41 +02:00
0b67b126dd 1.0.1
All checks were successful
Compile the repository / compile (push) Successful in 9s
Build a docker image for node-jellyfin-role-bot / build-docker-image (push) Has been skipped
2023-06-19 23:19:40 +02:00
6d5725be90 Merge pull request 'fix/movie_names_and_background_task' (#46) from fix/movie_names_and_background_task into master
All checks were successful
Compile the repository / compile (push) Successful in 11s
Reviewed-on: #46
2023-06-19 11:29:04 +02:00
59f5b34e5a Merge branch 'master' into fix/movie_names_and_background_task
All checks were successful
Compile the repository / compile (push) Successful in 1m31s
2023-06-19 11:19:17 +02:00
f5928049ea Merge pull request 'fix and refactor mitgucken guide' (#44) from fix/guide into master
All checks were successful
Compile the repository / compile (push) Successful in 9s
Reviewed-on: #44
2023-06-17 12:17:29 +02:00
99905f98d0 Merge pull request 'fix/ci-cd-push' (#45) from fix/ci-cd-push into master
All checks were successful
Compile the repository / compile (push) Successful in 10s
Reviewed-on: #45
2023-06-17 12:16:13 +02:00
1e6a75687a add package version extraction to docker push job
All checks were successful
Compile the repository / compile (push) Successful in 9s
2023-06-17 01:31:03 +02:00
2c09033c3f add new tag restriction to docker push job
All checks were successful
Compile the repository / compile (push) Successful in 9s
2023-06-17 01:27:49 +02:00
ce4441cee3 add restriction to master branch on docker push job
All checks were successful
Compile the repository / compile (push) Successful in 9s
Build a docker image for node-jellyfin-role-bot / build-docker-image (push) Has been skipped
2023-06-17 01:22:53 +02:00
7c8072b295 add separate compile step
should be run on every push to a branch to check for compilability
2023-06-17 01:20:54 +02:00
7899aac5ce adjust server connection message
All checks were successful
Build a docker image for node-jellyfin-role-bot / build-docker-image (push) Successful in 1m22s
remove extraneous repetition of the server address
2023-06-17 01:20:01 +02:00
26c2d91252 fix and refactor mitgucken guide
All checks were successful
Build a docker image for node-jellyfin-role-bot / build-docker-image (push) Successful in 1m16s
- reorder account acquisition in front of login
- rebox explainrole function
- adjust external reference to function
2023-06-17 01:13:33 +02:00
6 changed files with 41 additions and 18 deletions

View File

@ -0,0 +1,17 @@
name: Compile the repository
on: [pull_request]
env:
REGISTRY: gitea.brudi.xyz
IMAGE_NAME: ${{ gitea.repository }}
USER: ${{ gitea.actor }}
jobs:
compile:
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build Container
run: docker build .

View File

@ -1,6 +1,9 @@
name: Build a docker image for node-jellyfin-role-bot
run-name: ${{ gitea.actor }} is building an image
on: [push]
on:
push:
tags:
- '*'
env:
REGISTRY: gitea.brudi.xyz
IMAGE_NAME: ${{ gitea.repository }}
@ -8,6 +11,7 @@ env:
jobs:
build-docker-image:
runs-on: ubuntu-latest
#if: gitea.ref == 'refs/heads/master'
container: catthehacker/ubuntu:act-latest
permissions:
contents: read
@ -18,6 +22,6 @@ jobs:
- name: Log in to the Container registry
run: docker login -u ${{ env.USER }} -p ${{ secrets.TOKEN }} ${{ env.REGISTRY }}
- name: Build Container
run: docker build -t "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" .
run: docker build -t "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" -t "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ node -p "require('./package.json').version" }}".
- name: Push Container
run: docker push "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest"
run: docker push --all-tags "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "node-jellyfin-discord-bot",
"version": "1.0.0",
"version": "1.0.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "node-jellyfin-discord-bot",
"version": "1.0.0",
"version": "1.0.4",
"license": "MIT",
"dependencies": {
"@discordjs/rest": "^1.7.0",

View File

@ -1,6 +1,6 @@
{
"name": "node-jellyfin-discord-bot",
"version": "1.0.0",
"version": "1.0.4",
"description": "A discord bot to sync jellyfin accounts with discord roles",
"main": "index.js",
"license": "MIT",

View File

@ -5,7 +5,7 @@ import { accountChoice, joingroup, leavegroup, loginScreen, overview, resume, se
import { logger } from '../logger'
import { Command } from '../structures/command'
import { RunOptions } from '../types/commandTypes'
import { configureServer, explainRoles, installation, loginInfo, useSyncgroup } from './mitgucken'
import { configureServer, explainRole, installation, loginInfo, useSyncgroup } from './mitgucken'
export default new Command({
name: 'guides',
@ -70,7 +70,7 @@ export default new Command({
userDMChannel.send({ embeds: useSyncgroup(), files: [overview, joingroup, resume, leavegroup] })
} else if (guideSelection.customId === 'explainRoles') {
const userDMChannel = await guideSelection.user.createDM()
userDMChannel.send(explainRoles())
userDMChannel.send({ embeds: explainRole() })
}
guideSelection.update({ content: "Hab ich dir per DM geschickt :)", components: [] })

View File

@ -16,13 +16,9 @@ export default new Command({
const embedList: APIEmbed[] = []
embedList.push(...installation())
embedList.push(...configureServer())
embedList.push(...explainRole())
embedList.push(...loginInfo())
embedList.push(...useSyncgroup())
embedList.push({
color,
title: "Wie du an einen Account kommst",
description: explainRoles()
})
//logger.info(`Trying to use ${splashScreen.name}`, { requestId, guildId: interaction.interaction.guild?.id })
logger.info(`Sending guide to ${interaction.interaction.user.id}`, { requestId, guildId: interaction.interaction.guild?.id })
@ -32,6 +28,13 @@ export default new Command({
})
export function explainRole(): APIEmbed[] {
return [{
color,
title: "Wie du an einen Account kommst",
description: roleExplanation
}]
}
export function installation(): APIEmbed[] {
const embedList: APIEmbed[] = []
// DownloadLink and installation
@ -67,7 +70,7 @@ export function configureServer(): APIEmbed[] {
title: "Server Verbindung",
description: "Stelle eine Verbindung zum Hartzarett Jellyfin Server her",
fields: [
{ name: "Server Adresse", value: "https://media.hartzarett.ruhr" }
{ name: "Server Adresse", value: "`https://media.hartzarett.ruhr`" }
],
image: {
url: 'attachment://server_verbindung.png'
@ -91,7 +94,7 @@ export function loginInfo(): APIEmbed[] {
embedList.push({
color,
title: "Login",
description: "Melde dich mit dem Usernamen und Passwort an, welches dir von mir zugeschickt wird. Falls du ein neues brauchst führe einmal /reset_passwort aus :)",
description: "Melde dich mit dem Usernamen und Passwort an, welches dir von mir zugeschickt wird. Falls du ein neues brauchst führe einmal `/passwort_reset` aus :)",
image: {
url: 'attachment://login_screen.png'
}
@ -139,8 +142,7 @@ export function useSyncgroup(): APIEmbed[] {
return embedList
}
export function explainRoles(): string {
return `Mit einer Rolle kann dafür gesorgt werden, dass du einen dauerhaften Account auf dem Mediaserver hast. Wende dich bei Bedarf an Samantha oder Markus.\n
const roleExplanation = `Mit einer Rolle kann dafür gesorgt werden, dass du einen dauerhaften Account auf dem Mediaserver hast. Wende dich bei Bedarf an Samantha oder Markus.\n
Für eine watchparty bekommst du allerdings automatisch einen Account. Hierfür melde einfach Interesse an dem Event an. Wenn du für das Event Interesse angemeldet hast bekommst du automatisch beim Start des Events einen Benutzernamen und das dazugehörige Passwort zugesendet.\n
Hast du kein Interesse angemeldet bekommst du automatisch einen Nutzernamen und Passwort zugeschickt wenn du den Channel betrittst in dem das Event stattfindet.`
}