Compare commits

...

9 Commits

Author SHA1 Message Date
kenobi 59f5b34e5a Merge branch 'master' into fix/movie_names_and_background_task
Compile the repository / compile (push) Successful in 1m31s Details
2023-06-19 11:19:17 +02:00
kenobi f5928049ea Merge pull request 'fix and refactor mitgucken guide' (#44) from fix/guide into master
Compile the repository / compile (push) Successful in 9s Details
Reviewed-on: #44
2023-06-17 12:17:29 +02:00
kenobi 99905f98d0 Merge pull request 'fix/ci-cd-push' (#45) from fix/ci-cd-push into master
Compile the repository / compile (push) Successful in 10s Details
Reviewed-on: #45
2023-06-17 12:16:13 +02:00
mightypanders 1e6a75687a add package version extraction to docker push job
Compile the repository / compile (push) Successful in 9s Details
2023-06-17 01:31:03 +02:00
mightypanders 2c09033c3f add new tag restriction to docker push job
Compile the repository / compile (push) Successful in 9s Details
2023-06-17 01:27:49 +02:00
mightypanders ce4441cee3 add restriction to master branch on docker push job
Compile the repository / compile (push) Successful in 9s Details
Build a docker image for node-jellyfin-role-bot / build-docker-image (push) Has been skipped Details
2023-06-17 01:22:53 +02:00
mightypanders 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
mightypanders 7899aac5ce adjust server connection message
Build a docker image for node-jellyfin-role-bot / build-docker-image (push) Successful in 1m22s Details
remove extraneous repetition of the server address
2023-06-17 01:20:01 +02:00
mightypanders 26c2d91252 fix and refactor mitgucken guide
Build a docker image for node-jellyfin-role-bot / build-docker-image (push) Successful in 1m16s Details
- reorder account acquisition in front of login
- rebox explainrole function
- adjust external reference to function
2023-06-17 01:13:33 +02:00
4 changed files with 39 additions and 14 deletions

View File

@ -0,0 +1,17 @@
name: Compile the repository
on: [push]
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 -t "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" .

View File

@ -1,6 +1,9 @@
name: Build a docker image for node-jellyfin-role-bot name: Build a docker image for node-jellyfin-role-bot
run-name: ${{ gitea.actor }} is building an image run-name: ${{ gitea.actor }} is building an image
on: [push] on:
push:
tags:
- '*'
env: env:
REGISTRY: gitea.brudi.xyz REGISTRY: gitea.brudi.xyz
IMAGE_NAME: ${{ gitea.repository }} IMAGE_NAME: ${{ gitea.repository }}
@ -8,6 +11,7 @@ env:
jobs: jobs:
build-docker-image: build-docker-image:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: gitea.ref == 'refs/heads/master'
container: catthehacker/ubuntu:act-latest container: catthehacker/ubuntu:act-latest
permissions: permissions:
contents: read contents: read
@ -15,9 +19,11 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Get Package Version
run: VERSION = node -p "require('./package.json').version"
- name: Log in to the Container registry - name: Log in to the Container registry
run: docker login -u ${{ env.USER }} -p ${{ secrets.TOKEN }} ${{ env.REGISTRY }} run: docker login -u ${{ env.USER }} -p ${{ secrets.TOKEN }} ${{ env.REGISTRY }}
- name: Build Container - 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 }}:${{ env.VERSION }}".
- name: Push Container - name: Push Container
run: docker push "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" run: docker push "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest"

View File

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

View File

@ -16,13 +16,9 @@ export default new Command({
const embedList: APIEmbed[] = [] const embedList: APIEmbed[] = []
embedList.push(...installation()) embedList.push(...installation())
embedList.push(...configureServer()) embedList.push(...configureServer())
embedList.push(...explainRole())
embedList.push(...loginInfo()) embedList.push(...loginInfo())
embedList.push(...useSyncgroup()) 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(`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 }) 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[] { export function installation(): APIEmbed[] {
const embedList: APIEmbed[] = [] const embedList: APIEmbed[] = []
// DownloadLink and installation // DownloadLink and installation
@ -67,7 +70,7 @@ export function configureServer(): APIEmbed[] {
title: "Server Verbindung", title: "Server Verbindung",
description: "Stelle eine Verbindung zum Hartzarett Jellyfin Server her", description: "Stelle eine Verbindung zum Hartzarett Jellyfin Server her",
fields: [ fields: [
{ name: "Server Adresse", value: "https://media.hartzarett.ruhr" } { name: "Server Adresse", value: "`https://media.hartzarett.ruhr`" }
], ],
image: { image: {
url: 'attachment://server_verbindung.png' url: 'attachment://server_verbindung.png'
@ -91,7 +94,7 @@ export function loginInfo(): APIEmbed[] {
embedList.push({ embedList.push({
color, color,
title: "Login", 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: { image: {
url: 'attachment://login_screen.png' url: 'attachment://login_screen.png'
} }
@ -139,8 +142,7 @@ export function useSyncgroup(): APIEmbed[] {
return embedList return embedList
} }
export function explainRoles(): string { 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
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
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 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.` Hast du kein Interesse angemeldet bekommst du automatisch einen Nutzernamen und Passwort zugeschickt wenn du den Channel betrittst in dem das Event stattfindet.`
}