Skip to content

Commit c2d1106

Browse files
authored
Merge pull request #387 from wizarrrr/develop
Chores & Nightly Build [skip ci]
2 parents 724755e + 90d9d1b commit c2d1106

File tree

11 files changed

+337
-27
lines changed

11 files changed

+337
-27
lines changed

.github/workflows/beta-ci.yml renamed to .github/workflows/master-beta-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI/CD Build Docker [Beta]
1+
name: CI/CD Build Image [Master/Beta]
22

33
on:
44
push:

.github/workflows/nightly-ci.yml

+180
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
name: CI/CD Build Image [Nightly]
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
workflow_dispatch: {}
8+
9+
permissions:
10+
packages: write
11+
contents: write
12+
13+
env:
14+
GHCR_REGISTRY: ghcr.io
15+
DH_REGISTRY: docker.io
16+
IMAGE_NAME: wizarrrr/wizarr
17+
18+
jobs:
19+
before_build:
20+
name: Prepare for Build
21+
runs-on: ubuntu-latest
22+
steps:
23+
# Clear the digests from the artifacts
24+
- name: Clear digests
25+
uses: geekyeggo/delete-artifact@v2
26+
with:
27+
name: |
28+
digests_dh
29+
digests_ghcr
30+
31+
build:
32+
name: Build Digest for Registry
33+
runs-on: ubuntu-latest
34+
needs:
35+
- before_build
36+
strategy:
37+
fail-fast: false
38+
matrix:
39+
platform:
40+
- linux/amd64
41+
- linux/arm64
42+
43+
steps:
44+
# Checkout the repository
45+
- name: Checkout
46+
uses: actions/checkout@v4
47+
with:
48+
fetch-depth: 0
49+
persist-credentials: false
50+
51+
# Use NPM and Node.js to install dependencies
52+
- name: Use Node.js 18.18.2
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version: 18.18.2
56+
57+
# Use Python and Poetry to install dependencies
58+
- uses: actions/setup-python@v4
59+
with:
60+
python-version: "3.10"
61+
62+
# Install Poetry and configure it to not create a virtual environment
63+
- name: Install Poetry
64+
run: |
65+
pip install poetry==1.6.1
66+
poetry config virtualenvs.create false
67+
68+
# Install the dependencies for the repository
69+
- name: Install dependencies
70+
run: npm install
71+
72+
# Build the repository
73+
- name: Build the Repository
74+
run: |
75+
npx nx build wizarr-backend
76+
npx nx build wizarr-frontend
77+
78+
# Set up Docker Buildx
79+
- name: Set up Docker Buildx
80+
uses: docker/setup-buildx-action@v3
81+
82+
# Login to GHCR
83+
- name: Login to GHCR
84+
uses: docker/login-action@v3
85+
with:
86+
registry: ${{ env.GHCR_REGISTRY }}
87+
username: ${{ github.actor }}
88+
password: ${{ secrets.GITHUB_TOKEN }}
89+
90+
# Build and push by digest
91+
- name: Build and push by digest
92+
id: build
93+
uses: docker/build-push-action@v5
94+
with:
95+
context: .
96+
file: ./dockerfiles/wizarr-ci/Dockerfile
97+
push: true
98+
platforms: ${{ matrix.platform }}
99+
provenance: false
100+
outputs: type=image,name=${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true
101+
102+
# Export the digest to a file
103+
- name: Export digest
104+
run: |
105+
mkdir -p /tmp/digests
106+
digest="${{ steps.build.outputs.digest }}"
107+
touch "/tmp/digests/${digest#sha256:}"
108+
109+
# Upload the digest to the artifacts
110+
- name: Upload digest
111+
uses: actions/upload-artifact@v3
112+
with:
113+
name: digests_ghcr
114+
path: /tmp/digests/*
115+
if-no-files-found: error
116+
retention-days: 1
117+
118+
merge:
119+
name: Merge Digest to Registry
120+
runs-on: ubuntu-latest
121+
needs:
122+
- build
123+
steps:
124+
# Checkout the repository
125+
- name: Checkout
126+
uses: actions/checkout@v4
127+
with:
128+
fetch-depth: 0
129+
persist-credentials: false
130+
131+
# Check if the tag is a beta or latest release
132+
- name: Get Release Branch
133+
id: release-branch
134+
run: |
135+
if [[ ${{ github.ref }} == 'refs/heads/develop' ]]; then
136+
echo "::set-output name=release_branch::nightly"
137+
else
138+
echo "Unknown tag, not setting environment variable."
139+
exit 1
140+
fi
141+
142+
# Download the digests from the artifacts
143+
- name: Download digests
144+
uses: actions/download-artifact@v3
145+
with:
146+
name: digests_ghcr
147+
path: /tmp/digests
148+
149+
# Set up Docker Buildx
150+
- name: Set up Docker Buildx
151+
uses: docker/setup-buildx-action@v3
152+
153+
# Login to GHCR
154+
- name: Login to GHCR
155+
uses: docker/login-action@v3
156+
with:
157+
registry: ghcr.io
158+
username: ${{ github.actor }}
159+
password: ${{ secrets.GITHUB_TOKEN }}
160+
161+
# Create manifest list and push to Registry
162+
- name: Login to Docker Hub
163+
uses: docker/login-action@v3
164+
with:
165+
registry: ${{ env.DH_REGISTRY }}
166+
username: ${{ secrets.DOCKERHUB_USERNAME }}
167+
password: ${{ secrets.DOCKERHUB_TOKEN }}
168+
169+
# Create manifest list and push to Registry
170+
- name: Create manifest list and push to Registry
171+
working-directory: /tmp/digests
172+
run: |
173+
docker buildx imagetools create \
174+
--tag ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.release-branch.outputs.release_branch }} \
175+
--tag ${{ env.DH_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.release-branch.outputs.release_branch }} \
176+
$(printf '${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
177+
178+
# Inspect the image
179+
- name: Inspect image
180+
run: docker buildx imagetools inspect ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.release-branch.outputs.release_branch }}

.github/workflows/beta-release.yml renamed to .github/workflows/semantic-release.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI/CD Release [Beta]
1+
name: CI/CD Semantic Release [Master/Beta]
22

33
on:
44
push:
@@ -85,3 +85,12 @@ jobs:
8585
SENTRY_PROJECT: wizarr-frontend wizarr-backend
8686
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
8787
CURRENT_BRANCH: ${{ steps.branch-name.outputs.current_branch }}
88+
89+
# Sync master/beta back into develop so 'latest' file is always up to date
90+
- name: Merge working branch -> develop
91+
uses: devmasx/merge-branch@master
92+
with:
93+
type: now
94+
github_token: ${{ steps.gh_app.outputs.token }}
95+
from_branch: ${{ github.ref_name }}
96+
target_branch: develop

.vscode/extensions.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"recommendations": ["nrwl.angular-console", "esbenp.prettier-vscode", "dbaeumer.vscode-eslint", "firsttris.vscode-jest-runner", "Vue.volar", "Vue.vscode-typescript-vue-plugin", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
2+
"recommendations": ["nrwl.angular-console", "esbenp.prettier-vscode", "dbaeumer.vscode-eslint", "firsttris.vscode-jest-runner", "Vue.volar", "Vue.vscode-typescript-vue-plugin", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "adam-bender.commit-message-editor", "nrwl.angular-console"]
33
}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<a href="https://discord.gg/XXCz7aM3ak"><img alt="Chat on Discord" src="https://img.shields.io/discord/1020742926856372224"/></a>
1515
<a href="https://www.reddit.com/r/wizarr"><img alt="Join our Subreddit" src="https://img.shields.io/badge/reddit-r%2Fwizarr-%23FF5700.svg"/></a>
1616
<a href="https://github.com/Wizarrrr/wizarr/issues"><img alt="Github Issue" src="https://img.shields.io/github/issues/wizarrrr/wizarr"/></a>
17-
<a href="https://github.com/Wizarrrr/wizarr/actions/workflows/beta-ci.yml"><img alt="Github Build" src="https://img.shields.io/github/actions/workflow/status/wizarrrr/wizarr/beta-ci.yml"/></a>
17+
<a href="https://github.com/Wizarrrr/wizarr/actions/workflows/master-beta-ci.yml"><img alt="Github Build" src="https://img.shields.io/github/actions/workflow/status/wizarrrr/wizarr/master-beta-ci.yml"/></a>
1818
</p>
1919

2020
---

apps/wizarr-backend/wizarr_backend/helpers/emby.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,10 @@ def invite_emby_user(username: str, password: str, code: str, server_api_key: Op
265265
post_emby(api_path=f"/Users/{user_response['Id']}/Password", json={"NewPw": str(password)}, server_api_key=server_api_key, server_url=server_url)
266266

267267
# Create policy object
268-
new_policy = { "EnableAllFolders": True }
268+
new_policy = {
269+
"EnableAllFolders": True,
270+
"AuthenticationProviderId": "Emby.Server.Implementations.Library.DefaultAuthenticationProvider",
271+
}
269272

270273
# Set library options
271274
if sections:

apps/wizarr-backend/wizarr_backend/helpers/jellyfin.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,10 @@ def invite_jellyfin_user(username: str, password: str, code: str, server_api_key
260260
user_response = post_jellyfin(api_path="/Users/New", json=new_user, server_api_key=server_api_key, server_url=server_url)
261261

262262
# Create policy object
263-
new_policy = {"EnableAllFolders": True}
263+
new_policy = {
264+
"EnableAllFolders": True,
265+
"AuthenticationProviderId": "Jellyfin.Server.Implementations.Users.DefaultAuthenticationProvider",
266+
}
264267

265268
# Set library options
266269
if sections:

apps/wizarr-frontend/src/modules/home/views/Home.vue

+7-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@
1616
</p>
1717
<div class="flex flex-col space-y-2 sm:flex-row sm:justify-center sm:space-y-0 sm:space-x-3">
1818
<FormKit type="button" @click="$router.push('/join')" theme="primary" suffix-icon="fas fa-arrow-right">{{ __("Get Started") }}</FormKit>
19-
<!-- TODO: hiding unimplemented features -->
20-
<!-- <span class="inline-flex items-center text-gray-500 dark:text-gray-400 justify-center"> or </span> -->
21-
<!-- <FormKit type="button" :disabled="true" data-theme="transparent">{{ __("Request Access") }}</FormKit> -->
19+
<span class="inline-flex items-center text-gray-500 dark:text-gray-400 justify-center"> or </span>
20+
<VTooltip>
21+
<FormKit type="button" :disabled="true" data-theme="transparent">{{ __("Request Access") }}</FormKit>
22+
<template #popper>
23+
<span>{{ __("Coming Soon") }}</span>
24+
</template>
25+
</VTooltip>
2226
</div>
2327
</div>
2428
</section>

apps/wizarr-frontend/src/modules/settings/components/Forms/MediaForm.vue

+10-5
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,16 @@
2727
<FormKit type="button" v-if="saved || !setup" prefix-icon="fas fa-list" data-theme="secondary" @click="scanLibraries">
2828
{{ __("Scan Libraries") }}
2929
</FormKit>
30-
31-
<!-- Scan Servers -->
32-
<FormKit type="button" :disabled="true" v-if="!serverForm.server_type || !setup" prefix-icon="fas fa-server" data-theme="secondary" @click="scanServers">
33-
{{ __("Scan Servers") }}
34-
</FormKit>
30+
<VTooltip>
31+
<!-- Scan Servers -->
32+
<FormKit type="button" :disabled="true" v-if="!serverForm.server_type || !setup" prefix-icon="fas fa-server" data-theme="secondary" @click="scanServers">
33+
{{ __("Scan Servers") }}
34+
</FormKit>
35+
36+
<template #popper>
37+
<span>{{ __("Coming Soon") }}</span>
38+
</template>
39+
</VTooltip>
3540
</div>
3641
<div class="flex flex-grow justify-end sm:justify-end space-x-2 mt-2">
3742
<!-- Verify Server -->

develop.code-workspace

+106-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,111 @@
2020
"settings": {
2121
"files.exclude": {
2222
"**/apps/": true
23-
}
23+
},
24+
"commit-message-editor.staticTemplate": ["feat: Short description", "", "Message body", "", "Message footer"],
25+
"commit-message-editor.dynamicTemplate": ["{type}{scope}: {description}", "", "{body}", "", "{skip_ci}", "", "{breaking_change}{footer}"],
26+
"commit-message-editor.tokens": [
27+
{
28+
"label": "Type",
29+
"name": "type",
30+
"type": "enum",
31+
"options": [
32+
{
33+
"label": "---",
34+
"value": ""
35+
},
36+
{
37+
"label": "build",
38+
"description": "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)"
39+
},
40+
{
41+
"label": "chore",
42+
"description": "Updating grunt tasks etc; no production code change"
43+
},
44+
{
45+
"label": "ci",
46+
"description": "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)"
47+
},
48+
{
49+
"label": "docs",
50+
"description": "Documentation only changes"
51+
},
52+
{
53+
"label": "feat",
54+
"description": "A new feature"
55+
},
56+
{
57+
"label": "fix",
58+
"description": "A bug fix"
59+
},
60+
{
61+
"label": "perf",
62+
"description": "A code change that improves performance"
63+
},
64+
{
65+
"label": "refactor",
66+
"description": "A code change that neither fixes a bug nor adds a feature"
67+
},
68+
{
69+
"label": "revert"
70+
},
71+
{
72+
"label": "style",
73+
"description": "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)"
74+
},
75+
{
76+
"label": "test",
77+
"description": "Adding missing tests or correcting existing tests"
78+
}
79+
],
80+
"description": "Type of changes"
81+
},
82+
{
83+
"label": "Scope",
84+
"name": "scope",
85+
"description": "A scope may be provided to a commit’s type, to provide additional contextual information and is contained within parenthesis, e.g., \"feat(parser): add ability to parse arrays\".",
86+
"type": "text",
87+
"multiline": false,
88+
"prefix": "(",
89+
"suffix": ")"
90+
},
91+
{
92+
"label": "Short description",
93+
"name": "description",
94+
"description": "Short description in the subject line.",
95+
"type": "text",
96+
"multiline": false
97+
},
98+
{
99+
"label": "Body",
100+
"name": "body",
101+
"description": "Optional body",
102+
"type": "text",
103+
"multiline": true,
104+
"lines": 5,
105+
"maxLines": 10
106+
},
107+
{
108+
"label": "Breaking change",
109+
"name": "breaking_change",
110+
"type": "boolean",
111+
"value": "BREAKING CHANGE: "
112+
},
113+
{
114+
"label": "Footer",
115+
"name": "footer",
116+
"description": "Optional footer",
117+
"type": "text",
118+
"multiline": true
119+
},
120+
{
121+
"label": "Skip CI",
122+
"name": "skip_ci",
123+
"type": "boolean",
124+
"value": "[skip ci]"
125+
}
126+
],
127+
"commit-message-editor.view.defaultView": "form",
128+
"commit-message-editor.view.visibleViews": "form"
24129
}
25130
}

0 commit comments

Comments
 (0)