Compare commits
18 Commits
v0.1.0-beta
...
v0.1.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 9204fed54c | |||
| 406d0f5652 | |||
| 9cd651bdfe | |||
| 96336fd637 | |||
| e7d1b4b524 | |||
| a4d7269f8f | |||
| c7d741d15b | |||
| 6d2a6c5925 | |||
| 9ccb929553 | |||
| 5e086c0598 | |||
| a7c86289b3 | |||
| b2e851d765 | |||
| 1a1d7dec7c | |||
| 103da6abe8 | |||
| 5f2fdbac87 | |||
| e0ceb7d314 | |||
| 8df80eba3b | |||
| 77875110f0 |
@@ -24,13 +24,6 @@ jobs:
|
|||||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
echo "REPO_LC=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
|
echo "REPO_LC=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Login to own image registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: gitea.penry.de
|
|
||||||
username: ${{ secrets.REGISTRY_USER }}
|
|
||||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Setup .NET10
|
- name: Setup .NET10
|
||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
@@ -42,8 +35,16 @@ jobs:
|
|||||||
-t gitea.penry.de/${{ env.REPO_LC }}:${{ env.VERSION }} \
|
-t gitea.penry.de/${{ env.REPO_LC }}:${{ env.VERSION }} \
|
||||||
-t gitea.penry.de/${{ env.REPO_LC }}:latest \
|
-t gitea.penry.de/${{ env.REPO_LC }}:latest \
|
||||||
--label "org.opencontainers.image.source=https://gitea.penry.de/${{ github.repository }}" \
|
--label "org.opencontainers.image.source=https://gitea.penry.de/${{ github.repository }}" \
|
||||||
|
--build-arg VERSION=${{ env.VERSION }} \
|
||||||
.
|
.
|
||||||
|
|
||||||
|
- name: Login to own image registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: gitea.penry.de
|
||||||
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
- name: Push Images
|
- name: Push Images
|
||||||
run: |
|
run: |
|
||||||
docker push gitea.penry.de/${{ env.REPO_LC }}:${{ env.VERSION }}
|
docker push gitea.penry.de/${{ env.REPO_LC }}:${{ env.VERSION }}
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup Docker Buildx
|
- name: Setup Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@@ -28,62 +30,35 @@ jobs:
|
|||||||
- name: Build version
|
- name: Build version
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
LAST_TAG=$(git describe --tags --abbrev=0)
|
||||||
|
|
||||||
git fetch --force --tags origin
|
|
||||||
git fetch --force origin main:refs/remotes/origin/main
|
|
||||||
|
|
||||||
LAST_TAG=$(git for-each-ref \
|
|
||||||
--sort=-creatordate \
|
|
||||||
--format='%(refname:strip=2)' \
|
|
||||||
refs/tags/v* \
|
|
||||||
| head -n 1)
|
|
||||||
|
|
||||||
if [[ -z "${LAST_TAG:-}" ]]; then
|
|
||||||
echo "No tag found"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
LAST_COMMIT=$(git rev-list -n 1 "$LAST_TAG")
|
|
||||||
DISTANCE=$(git rev-list --count --first-parent "${LAST_COMMIT}..origin/main")
|
|
||||||
|
|
||||||
BASE_VERSION="${LAST_TAG#v}"
|
|
||||||
|
|
||||||
if [[ "$BASE_VERSION" == *-* ]]; then
|
|
||||||
VERSION="${BASE_VERSION}.${DISTANCE}"
|
|
||||||
else
|
|
||||||
VERSION="${BASE_VERSION}-nightly.${DISTANCE}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "LAST_TAG=$LAST_TAG" >> "$GITHUB_ENV"
|
|
||||||
echo "LAST_COMMIT=$LAST_COMMIT" >> "$GITHUB_ENV"
|
|
||||||
echo "DISTANCE=$DISTANCE" >> "$GITHUB_ENV"
|
|
||||||
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
|
|
||||||
|
|
||||||
echo "Last tag: $LAST_TAG"
|
|
||||||
echo "Last tag commit: $LAST_COMMIT"
|
|
||||||
echo "Distance to origin/main: $DISTANCE"
|
|
||||||
echo "Final version: $VERSION"
|
|
||||||
|
|
||||||
- name: Set .NET version variables
|
if [[ -z "${LAST_TAG:-}" ]]; then
|
||||||
shell: bash
|
echo "No tag found"
|
||||||
run: |
|
exit 1
|
||||||
set -euo pipefail
|
fi
|
||||||
|
|
||||||
SEMVER="${VERSION}"
|
COMMIT_COUNT=$(git rev-list $LAST_TAG..HEAD --count)
|
||||||
BASE_NUMERIC=$(echo "$SEMVER" | sed -E 's/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/')
|
|
||||||
BUILD_NO=$(echo "$SEMVER" | grep -oE '[0-9]+$' || echo "0")
|
if [[ "$LAST_TAG" == *-* ]]; then
|
||||||
|
TEMP_LAST_TAG="${LAST_TAG%-*}"
|
||||||
echo "PACKAGE_VERSION=$SEMVER" >> "$GITHUB_ENV"
|
VERSION="${TEMP_LAST_TAG}-nightly.${COMMIT_COUNT}"
|
||||||
echo "ASSEMBLY_VERSION=${BASE_NUMERIC}.0" >> "$GITHUB_ENV"
|
else
|
||||||
echo "FILE_VERSION=${BASE_NUMERIC}.${BUILD_NO}" >> "$GITHUB_ENV"
|
VERSION="${LAST_TAG}-nightly.${COMMIT_COUNT}"
|
||||||
echo "INFORMATIONAL_VERSION=$SEMVER" >> "$GITHUB_ENV"
|
fi
|
||||||
|
|
||||||
|
echo "LAST_TAG=$LAST_TAG" >> "$GITHUB_ENV"
|
||||||
|
echo "COMMIT_COUNT=$COMMIT_COUNT" >> "$GITHUB_ENV"
|
||||||
|
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
echo "Last tag: $LAST_TAG"
|
||||||
|
echo "Commit count: $COMMIT_COUNT"
|
||||||
|
echo "Final version: $VERSION"
|
||||||
|
|
||||||
- name: Build Linux ARM64 Docker Image
|
- name: Build Linux ARM64 Docker Image
|
||||||
run: |
|
run: |
|
||||||
docker build \
|
docker build \
|
||||||
-t gitea.penry.de/${{ env.REPO_LC }}:nightly \
|
-t gitea.penry.de/${{ env.REPO_LC }}:nightly \
|
||||||
--build-arg VERSION=${{ env.PACKAGE_VERSION }} \
|
--build-arg VERSION=${{ env.VERSION }} \
|
||||||
.
|
.
|
||||||
|
|
||||||
- name: Login to own image registry
|
- name: Login to own image registry
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<MudCardMedia Image="@GlobalEntity.PicturePath" Height="400" Style="object-fit: contain;"/>
|
<MudCardMedia Image="@GlobalEntity.PicturePath" Height="400" Style="object-fit: contain;"/>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
<MudCardContent>
|
<MudCardContent>
|
||||||
<MudText Typo="Typo.h5">@GlobalEntity.Title</MudText>
|
<MudText Typo="Typo.h5" Style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">@GlobalEntity.Title</MudText>
|
||||||
</MudCardContent>
|
</MudCardContent>
|
||||||
<MudCardActions>
|
<MudCardActions>
|
||||||
<MudTooltip Text="Add to shared List">
|
<MudTooltip Text="Add to shared List">
|
||||||
|
|||||||
@@ -120,6 +120,9 @@
|
|||||||
|
|
||||||
//Picture
|
//Picture
|
||||||
private IBrowserFile? _pictureFile;
|
private IBrowserFile? _pictureFile;
|
||||||
|
private string _pictureBase64;
|
||||||
|
private string? _pictureContentType;
|
||||||
|
private string? _pictureExtension;
|
||||||
|
|
||||||
private class GlobalEntityFormModel
|
private class GlobalEntityFormModel
|
||||||
{
|
{
|
||||||
@@ -164,9 +167,12 @@
|
|||||||
await using var stream = _pictureFile.OpenReadStream(5242880);
|
await using var stream = _pictureFile.OpenReadStream(5242880);
|
||||||
using var ms = new MemoryStream();
|
using var ms = new MemoryStream();
|
||||||
await stream.CopyToAsync(ms);
|
await stream.CopyToAsync(ms);
|
||||||
|
|
||||||
|
_pictureContentType = _pictureFile.ContentType;
|
||||||
|
_pictureExtension = Path.GetExtension(_pictureFile.Name);
|
||||||
|
|
||||||
var base64 = Convert.ToBase64String(ms.ToArray());
|
_pictureBase64 = Convert.ToBase64String(ms.ToArray());
|
||||||
_imagePreview = $"data:{_pictureFile.ContentType};base64,{base64}";
|
_imagePreview = $"data:{_pictureFile.ContentType};base64,{_pictureBase64}";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Cancel() => MudDialog.Cancel();
|
private void Cancel() => MudDialog.Cancel();
|
||||||
@@ -191,13 +197,10 @@
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string fileName = $"{Guid.NewGuid()}{Path.GetExtension(_pictureFile.Name)}";
|
string fileName = $"{Guid.NewGuid()}{_pictureExtension}";
|
||||||
string picturePath = Path.Combine("wwwroot", "Pictures", fileName);
|
string picturePath = Path.Combine("wwwroot", "Pictures", fileName);
|
||||||
|
|
||||||
await using (var fs = File.Create(picturePath))
|
await File.WriteAllBytesAsync(picturePath, Convert.FromBase64String(_pictureBase64));
|
||||||
{
|
|
||||||
await _pictureFile.OpenReadStream(maxAllowedSize: 10_000_000).CopyToAsync(fs);
|
|
||||||
}
|
|
||||||
|
|
||||||
var entity = new GlobalEntity
|
var entity = new GlobalEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -151,7 +151,7 @@
|
|||||||
|
|
||||||
private async Task OnNewEntity(GlobalEntity entity)
|
private async Task OnNewEntity(GlobalEntity entity)
|
||||||
{
|
{
|
||||||
_globalEntities.Add(entity);
|
_globalEntities.Insert(0, entity);
|
||||||
await RefreshPage();
|
await RefreshPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<MudStack Class="pa-3" Spacing="2">
|
<MudStack Class="pa-3" Spacing="2">
|
||||||
<!--<editor-fold desc="Options">-->
|
<!--<editor-fold desc="Options">-->
|
||||||
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween">
|
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween">
|
||||||
<MudText Typo="Typo.h6">@PrivateEntity.GlobalEntity.Title</MudText>
|
<MudText Typo="Typo.h6" Style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap">@PrivateEntity.GlobalEntity.Title</MudText>
|
||||||
<MudMenu Icon="@Icons.Material.Filled.MoreVert" Color="Color.Default" Dense="true">
|
<MudMenu Icon="@Icons.Material.Filled.MoreVert" Color="Color.Default" Dense="true">
|
||||||
<MudMenuItem>Edit</MudMenuItem>
|
<MudMenuItem>Edit</MudMenuItem>
|
||||||
<MudMenuItem OnClick="@(() => OnRemove.InvokeAsync())">Remove</MudMenuItem>
|
<MudMenuItem OnClick="@(() => OnRemove.InvokeAsync())">Remove</MudMenuItem>
|
||||||
@@ -39,46 +39,51 @@
|
|||||||
}
|
}
|
||||||
</MudSelect>
|
</MudSelect>
|
||||||
<!--</editor-fold>-->
|
<!--</editor-fold>-->
|
||||||
|
|
||||||
|
<!-- @if (PrivateEntity.GlobalEntity.MediaType.Name == "Series" || PrivateEntity.GlobalEntity.MediaType.Name == "Anime") -->
|
||||||
|
<!--{-->
|
||||||
|
<!--<editor-fold desc="Dropdown-Season">-->
|
||||||
|
<MudSelect
|
||||||
|
T="int?"
|
||||||
|
Value="PrivateEntity.Season"
|
||||||
|
ValueChanged="@(newSeason => OnSeasonChange.InvokeAsync(newSeason))"
|
||||||
|
Dense="true"
|
||||||
|
Variant="Variant.Outlined"
|
||||||
|
Label=""
|
||||||
|
Class="@(PrivateEntity.GlobalEntity.MediaType.Name == "Series" ? "" : "invisible")">
|
||||||
|
@{
|
||||||
|
int? currentSeason = PrivateEntity.Season ?? 1;
|
||||||
|
int? startOffsetSeason = currentSeason > 1 ? -1 : 0;
|
||||||
|
}
|
||||||
|
@for (int? i = startOffsetSeason; i <= 5; i++)
|
||||||
|
{
|
||||||
|
int? season = currentSeason + i;
|
||||||
|
<MudSelectItem Value="@season">Staffel @season</MudSelectItem>
|
||||||
|
}
|
||||||
|
</MudSelect>
|
||||||
|
<!--</editor-fold>-->
|
||||||
|
|
||||||
<!--<editor-fold desc="Dropdown-Season">-->
|
<!--<editor-fold desc="Dropdown-Episode">-->
|
||||||
<MudSelect
|
<MudSelect
|
||||||
T="int?"
|
T="int?"
|
||||||
Value="PrivateEntity.Season"
|
Value="PrivateEntity.Episode"
|
||||||
ValueChanged="@(newSeason => OnSeasonChange.InvokeAsync(newSeason))"
|
ValueChanged="@(newEpisode => OnEpisodeChange.InvokeAsync(newEpisode))"
|
||||||
Dense="true"
|
Dense="true"
|
||||||
Variant="Variant.Outlined"
|
Variant="Variant.Outlined"
|
||||||
Label="">
|
Label=""
|
||||||
@{
|
Class="@(PrivateEntity.GlobalEntity.MediaType.Name == "Series" ? "" : "invisible")">
|
||||||
int? currentSeason = PrivateEntity.Season ?? 1;
|
@{
|
||||||
int? startOffsetSeason = currentSeason > 1 ? -1 : 0;
|
int? currentEpisode = PrivateEntity.Episode ?? 1;
|
||||||
}
|
int? startOffsetEpisode = currentEpisode > 1 ? -1 : 0;
|
||||||
@for (int? i = startOffsetSeason; i <= 5; i++)
|
}
|
||||||
{
|
@for (int? i = startOffsetEpisode; i <= 5; i++)
|
||||||
int? season = currentSeason + i;
|
{
|
||||||
<MudSelectItem Value="@season">Staffel @season</MudSelectItem>
|
int? episode = currentEpisode + i;
|
||||||
}
|
<MudSelectItem Value="@episode">Episode @episode</MudSelectItem>
|
||||||
</MudSelect>
|
}
|
||||||
<!--</editor-fold>-->
|
</MudSelect>
|
||||||
|
<!--</editor-fold>-->
|
||||||
<!--<editor-fold desc="Dropdown-Episode">-->
|
<!--}-->
|
||||||
<MudSelect
|
|
||||||
T="int?"
|
|
||||||
Value="PrivateEntity.Episode"
|
|
||||||
ValueChanged="@(newEpisode => OnEpisodeChange.InvokeAsync(newEpisode))"
|
|
||||||
Dense="true"
|
|
||||||
Variant="Variant.Outlined"
|
|
||||||
Label="">
|
|
||||||
@{
|
|
||||||
int? currentEpisode = PrivateEntity.Episode ?? 1;
|
|
||||||
int? startOffsetEpisode = currentEpisode > 1 ? -1 : 0;
|
|
||||||
}
|
|
||||||
@for (int? i = startOffsetEpisode; i <= 5; i++)
|
|
||||||
{
|
|
||||||
int? episode = currentEpisode + i;
|
|
||||||
<MudSelectItem Value="@episode">Episode @episode</MudSelectItem>
|
|
||||||
}
|
|
||||||
</MudSelect>
|
|
||||||
<!--</editor-fold>-->
|
|
||||||
|
|
||||||
<!--<editor-fold desc="Details Button">-->
|
<!--<editor-fold desc="Details Button">-->
|
||||||
<MudStack Row="true" Justify="Justify.FlexEnd">
|
<MudStack Row="true" Justify="Justify.FlexEnd">
|
||||||
|
|||||||
@@ -5,4 +5,6 @@
|
|||||||
## About docker image Releases
|
## About docker image Releases
|
||||||
There are two options:
|
There are two options:
|
||||||
- latest: Is the latest release Version
|
- latest: Is the latest release Version
|
||||||
- nightly: Is the latest commit on the main branch
|
- nightly: Is the latest commit on the main branch
|
||||||
|
|
||||||
|
Test-Commit
|
||||||
|
|||||||
Reference in New Issue
Block a user