Compare commits

...

21 Commits

Author SHA1 Message Date
ac5ed47ced .github/workflows/ahri-build.yml hinzugefügt
All checks were successful
/ Build Container (push) Successful in 3m16s
2025-03-11 16:46:49 +00:00
ec6cf57740 remov shit 2024-01-10 19:51:19 +00:00
7fec58cf85 ? 2024-01-10 19:48:43 +00:00
b6e63f8b90 env 2024-01-10 19:43:08 +00:00
ef7996fe9a Update .gitlab-ci.yml 2024-01-10 19:40:49 +00:00
ff0df61d50 Update .gitlab-ci.yml 2024-01-10 19:37:42 +00:00
12ba4340b7 Merge branch 'v1.12.3' into 'ln-deploy'
POS and Crowdfund: Improve item editor (#5418)

See merge request synced/btcpayserver!9
2024-01-10 19:17:38 +00:00
f23078df1c Use buildx for creating and pushing docker images (#5592) 2023-12-22 14:23:04 +09:00
a35bf54a02 Changelog and bump 2023-12-22 14:21:12 +09:00
4867698ac9 AppService: Update inventory only for known app types (#5590)
There are apps, which do not have a template and hence no inventory. Accessing it via `settings[templatePath]!.Value` causes exceptions in those cases.
2023-12-22 14:21:01 +09:00
c768454d3c Merge branch 'v1.11.7' into 'ln-deploy'
Use _blank link targt for payment scheme links (#5284)

See merge request synced/btcpayserver!8
2023-10-19 20:51:47 +00:00
586ad238c6 Merge branch 'master' into 'ln-deploy'
Policies: Update wording to fit API keys and Roles (#5106)

See merge request synced/btcpayserver!7
2023-08-30 20:23:19 +00:00
69ea1dc72e Merge branch 'master' into 'ln-deploy'
Do not provide lnurl method if ln node is dead

See merge request synced/btcpayserver!6
2023-04-03 09:28:37 +00:00
f87b7935c9 Update .gitlab-ci.yml file 2023-03-21 19:26:51 +00:00
2ac7747388 Merge branch 'master' into 'ln-deploy'
Greenfield: Admins can create/delete API keys of any user (#4680)

See merge request synced/btcpayserver!5
2023-03-21 19:23:30 +00:00
affacc8b0c Merge branch 'master' into 'ln-deploy'
Add additional permission for pull payments (#4539)

See merge request synced/btcpayserver!4
2023-02-23 22:22:30 +00:00
9511c767dd Merge branch 'master' into 'ln-deploy'
[Greenfield]: Add DescriptionHashOnly to include a description hash in the BOLT11 (#4411)

See merge request synced/btcpayserver!3
2023-01-16 15:10:34 +00:00
6ccef71eba Merge branch 'master' into 'ln-deploy'
Fix Public Node Info View

See merge request synced/btcpayserver!2
2022-12-12 14:05:10 +00:00
a11d543ea8 Merge branch 'master' into 'ln-deploy'
Fix webhook display bug (#3959)

See merge request synced/btcpayserver!1
2022-07-26 21:52:21 +00:00
dc795587f0 Update .gitlab-ci.yml file 2022-07-09 01:03:24 +00:00
4e47a311a6 Update BTCPayServer.Data/Data/InvoiceSearchData.cs, .gitlab-ci.yml 2022-07-09 01:01:44 +00:00
11 changed files with 77 additions and 186 deletions

View File

@ -31,79 +31,23 @@ jobs:
- run:
command: |
curl -X POST -H "Authorization: token $GH_PAT" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/btcpayserver/btcpayserver-doc/dispatches --data '{"event_type": "build_docs"}'
# publish jobs require $DOCKERHUB_REPO, $DOCKERHUB_USER, $DOCKERHUB_PASS defined
amd64:
machine:
image: ubuntu-2004:202111-02
docker:
docker:
- image: cimg/base:stable
steps:
- setup_remote_docker
- checkout
- run:
command: |
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
GIT_COMMIT=$(git rev-parse HEAD)
#
sudo docker build --build-arg GIT_COMMIT=${GIT_COMMIT} --pull -t $DOCKERHUB_REPO:$LATEST_TAG-amd64 -f amd64.Dockerfile .
sudo docker build --build-arg GIT_COMMIT=${GIT_COMMIT} --pull --build-arg CONFIGURATION_NAME=Altcoins-Release -t $DOCKERHUB_REPO:$LATEST_TAG-altcoins-amd64 -f amd64.Dockerfile .
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-amd64
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-altcoins-amd64
arm32v7:
machine:
image: ubuntu-2004:202111-02
steps:
- checkout
- run:
command: |
sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
GIT_COMMIT=$(git rev-parse HEAD)
#
sudo docker build --build-arg GIT_COMMIT=${GIT_COMMIT} --pull -t $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 -f arm32v7.Dockerfile .
sudo docker build --build-arg GIT_COMMIT=${GIT_COMMIT} --pull --build-arg CONFIGURATION_NAME=Altcoins-Release -t $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm32v7 -f arm32v7.Dockerfile .
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-arm32v7
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm32v7
arm64v8:
machine:
image: ubuntu-2004:202111-02
steps:
- checkout
- run:
command: |
sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
GIT_COMMIT=$(git rev-parse HEAD)
#
sudo docker build --build-arg GIT_COMMIT=${GIT_COMMIT} --pull -t $DOCKERHUB_REPO:$LATEST_TAG-arm64v8 -f arm64v8.Dockerfile .
sudo docker build --build-arg GIT_COMMIT=${GIT_COMMIT} --build-arg CONFIGURATION_NAME=Altcoins-Release --pull -t $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm64v8 -f arm64v8.Dockerfile .
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-arm64v8
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm64v8
multiarch:
machine:
image: ubuntu-2004:202201-02
steps:
- run:
command: |
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
#
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
sudo docker manifest create --amend $DOCKERHUB_REPO:$LATEST_TAG $DOCKERHUB_REPO:$LATEST_TAG-amd64 $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 $DOCKERHUB_REPO:$LATEST_TAG-arm64v8
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG $DOCKERHUB_REPO:$LATEST_TAG-amd64 --os linux --arch amd64
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 --os linux --arch arm --variant v7
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG $DOCKERHUB_REPO:$LATEST_TAG-arm64v8 --os linux --arch arm64 --variant v8
sudo docker manifest push $DOCKERHUB_REPO:$LATEST_TAG -p
sudo docker manifest create --amend $DOCKERHUB_REPO:$LATEST_TAG-altcoins $DOCKERHUB_REPO:$LATEST_TAG-altcoins-amd64 $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm32v7 $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm64v8
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG-altcoins $DOCKERHUB_REPO:$LATEST_TAG-altcoins-amd64 --os linux --arch amd64
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG-altcoins $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm32v7 --os linux --arch arm --variant v7
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG-altcoins $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm64v8 --os linux --arch arm64 --variant v8
sudo docker manifest push $DOCKERHUB_REPO:$LATEST_TAG-altcoins -p
docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
docker buildx create --use
DOCKER_BUILDX_OPTS="--platform linux/amd64,linux/arm64,linux/arm/v7 --build-arg GIT_COMMIT=${GIT_COMMIT} --push"
docker buildx build $DOCKER_BUILDX_OPTS -t $DOCKERHUB_REPO:$LATEST_TAG .
docker buildx build $DOCKER_BUILDX_OPTS -t $DOCKERHUB_REPO:$LATEST_TAG-altcoins --build-arg CONFIGURATION_NAME=Altcoins-Release .
workflows:
version: 2
build_and_test:
@ -120,7 +64,7 @@ workflows:
# only act on version tags
tags:
only: /(v[1-9]+(\.[0-9]+)*(-[a-z0-9-]+)?)|(v[a-z0-9-]+)/
- amd64:
- docker:
filters:
# ignore any commit on any branch by default
branches:
@ -130,25 +74,3 @@ workflows:
# OR features on specific versions like v1.0.0.88-lndseedbackup-1
tags:
only: /(v[1-9]+(\.[0-9]+)*(-[a-z0-9-]+)?)|(v[a-z0-9-]+)/
- arm32v7:
filters:
branches:
ignore: /.*/
tags:
only: /(v[1-9]+(\.[0-9]+)*(-[a-z0-9-]+)?)|(v[a-z0-9-]+)/
- arm64v8:
filters:
branches:
ignore: /.*/
tags:
only: /(v[1-9]+(\.[0-9]+)*(-[a-z0-9-]+)?)|(v[a-z0-9-]+)/
- multiarch:
requires:
- amd64
- arm32v7
- arm64v8
filters:
branches:
ignore: /.*/
tags:
only: /(v[1-9]+(\.[0-9]+)*(-[a-z0-9-]+)?)|(v[a-z0-9-]+)/

26
.github/workflows/ahri-build.yml vendored Normal file
View File

@ -0,0 +1,26 @@
on: [push]
jobs:
build:
runs-on: ubuntu-latest
name: Build Container
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Setup Docker BuildX
id: setup-buildx
uses: actions/docker-setup-buildx-action@v3
- name: Login to Gitea
uses: actions/docker-login-action@v3
with:
registry: ${{ env.registry }}
username: ${{ gitea.actor }}
password: ${{ secrets.PAT_TOKEN }}
- name: Build the Container
id: build
uses: actions/docker-build-push-action@v6
with:
file: Dockerfile
context: .
push: true
tags: ${{ env.registry }}/${{ gitea.repository }}:latest

19
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,19 @@
stages:
- build
build:
image: docker:20.10.16
services:
- docker:20.10.16-dind
stage: build
variables:
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_CERTDIR: "/certs"
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: "$DOCKER_TLS_CERTDIR/client"
IMAGE_TAG: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:latest
script:
# Start The Docker Build
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $IMAGE_TAG -f Dockerfile .
- docker push $IMAGE_TAG

View File

@ -1,3 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
@ -9,7 +10,7 @@ namespace BTCPayServer.Data
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Key]
public int Id { get; set; }
public Int64 Id { get; set; }
[ForeignKey(nameof(InvoiceData))]
public string InvoiceDataId { get; set; }

View File

@ -401,11 +401,21 @@ retry:
_ => "Template"
};
var settings = JObject.Parse(row.settings);
var items = JArray.Parse(settings[templatePath]!.Value<string>()!);
if (!settings.TryGetValue(templatePath, out var template))
return;
var items = template.Type switch
{
JTokenType.String => JArray.Parse(template.Value<string>()!),
JTokenType.Array => (JArray)template,
_ => null
};
if (items is null)
return;
bool hasChange = false;
foreach (var change in changes)
{
var item = items.FirstOrDefault(i => i["id"]?.Value<string>() == change.ItemId && i["inventory"] is not null && i["inventory"]!.Type is JTokenType.Integer);
var item = items.FirstOrDefault(i => i["id"]?.Value<string>() == change.ItemId && i["inventory"]?.Type is JTokenType.Integer);
if (item is null)
continue;
var inventory = item["inventory"]!.Value<int>();

View File

@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<Version>1.12.2</Version>
<Version>1.12.3</Version>
</PropertyGroup>
</Project>

View File

@ -1,5 +1,11 @@
# Changelog
## 1.12.3
### Bug fixes
* Fix: Crashes would happen on some plugins introducing new apps type (#5590) @dennisreimann
## 1.12.2
### Bug fixes

View File

@ -1,45 +0,0 @@
# Note that we are using buster rather than bullseye. Somehow, raspberry pi 4 doesn't like bullseye.
FROM mcr.microsoft.com/dotnet/sdk:8.0.100-bookworm-slim AS builder
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
RUN apt-get update \
&& apt-get install -qq --no-install-recommends qemu-system-arm qemu-user-static qemu-user binfmt-support
WORKDIR /source
COPY nuget.config nuget.config
COPY Build/Common.csproj Build/Common.csproj
COPY BTCPayServer.Abstractions/BTCPayServer.Abstractions.csproj BTCPayServer.Abstractions/BTCPayServer.Abstractions.csproj
COPY BTCPayServer/BTCPayServer.csproj BTCPayServer/BTCPayServer.csproj
COPY BTCPayServer.Common/BTCPayServer.Common.csproj BTCPayServer.Common/BTCPayServer.Common.csproj
COPY BTCPayServer.Rating/BTCPayServer.Rating.csproj BTCPayServer.Rating/BTCPayServer.Rating.csproj
COPY BTCPayServer.Data/BTCPayServer.Data.csproj BTCPayServer.Data/BTCPayServer.Data.csproj
COPY BTCPayServer.Client/BTCPayServer.Client.csproj BTCPayServer.Client/BTCPayServer.Client.csproj
RUN cd BTCPayServer && dotnet restore
COPY BTCPayServer.Common/. BTCPayServer.Common/.
COPY BTCPayServer.Rating/. BTCPayServer.Rating/.
COPY BTCPayServer.Data/. BTCPayServer.Data/.
COPY BTCPayServer.Client/. BTCPayServer.Client/.
COPY BTCPayServer.Abstractions/. BTCPayServer.Abstractions/.
COPY BTCPayServer/. BTCPayServer/.
COPY Build/Version.csproj Build/Version.csproj
ARG CONFIGURATION_NAME=Release
ARG GIT_COMMIT
RUN cd BTCPayServer && dotnet publish -p:GitCommit=${GIT_COMMIT} --output /app/ --configuration ${CONFIGURATION_NAME}
# Note that we are using buster rather than bullseye. Somehow, raspberry pi 4 doesn't like bullseye.
FROM mcr.microsoft.com/dotnet/aspnet:8.0.0-bookworm-slim-arm32v7
COPY --from=builder /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static
RUN apt-get update && apt-get install -y --no-install-recommends iproute2 openssh-client \
&& rm -rf /var/lib/apt/lists/*
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
WORKDIR /datadir
WORKDIR /app
ENV BTCPAY_DATADIR=/datadir
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
VOLUME /datadir
COPY --from=builder "/app" .
COPY docker-entrypoint.sh docker-entrypoint.sh
ENTRYPOINT ["/app/docker-entrypoint.sh"]

View File

@ -1,46 +0,0 @@
# This is a manifest image, will pull the image with the same arch as the builder machine
FROM mcr.microsoft.com/dotnet/sdk:8.0.100-bookworm-slim AS builder
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV LC_ALL en_US.UTF-8
RUN apt-get update \
&& apt-get install -qq --no-install-recommends qemu-system-arm qemu-user-static qemu-user binfmt-support
WORKDIR /source
COPY nuget.config nuget.config
COPY Build/Common.csproj Build/Common.csproj
COPY BTCPayServer.Abstractions/BTCPayServer.Abstractions.csproj BTCPayServer.Abstractions/BTCPayServer.Abstractions.csproj
COPY BTCPayServer/BTCPayServer.csproj BTCPayServer/BTCPayServer.csproj
COPY BTCPayServer.Common/BTCPayServer.Common.csproj BTCPayServer.Common/BTCPayServer.Common.csproj
COPY BTCPayServer.Rating/BTCPayServer.Rating.csproj BTCPayServer.Rating/BTCPayServer.Rating.csproj
COPY BTCPayServer.Data/BTCPayServer.Data.csproj BTCPayServer.Data/BTCPayServer.Data.csproj
COPY BTCPayServer.Client/BTCPayServer.Client.csproj BTCPayServer.Client/BTCPayServer.Client.csproj
RUN cd BTCPayServer && dotnet restore
COPY BTCPayServer.Common/. BTCPayServer.Common/.
COPY BTCPayServer.Rating/. BTCPayServer.Rating/.
COPY BTCPayServer.Data/. BTCPayServer.Data/.
COPY BTCPayServer.Client/. BTCPayServer.Client/.
COPY BTCPayServer.Abstractions/. BTCPayServer.Abstractions/.
COPY BTCPayServer/. BTCPayServer/.
COPY Build/Version.csproj Build/Version.csproj
ARG CONFIGURATION_NAME=Release
ARG GIT_COMMIT
RUN cd BTCPayServer && dotnet publish -p:GitCommit=${GIT_COMMIT} --output /app/ --configuration ${CONFIGURATION_NAME}
# Force the builder machine to take make an arm runtime image. This is fine as long as the builder does not run any program
FROM mcr.microsoft.com/dotnet/aspnet:8.0.0-bookworm-slim-arm64v8
COPY --from=builder /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static
RUN apt-get update && apt-get install -y --no-install-recommends iproute2 openssh-client \
&& rm -rf /var/lib/apt/lists/*
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
WORKDIR /datadir
WORKDIR /app
ENV BTCPAY_DATADIR=/datadir
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
VOLUME /datadir
COPY --from=builder "/app" .
COPY docker-entrypoint.sh docker-entrypoint.sh
ENTRYPOINT ["/app/docker-entrypoint.sh"]

View File

@ -10,14 +10,12 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{29290EC7-00E6-4C4B-96D9-4D7E9611DF28}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
amd64.Dockerfile = amd64.Dockerfile
arm32v7.Dockerfile = arm32v7.Dockerfile
arm64v8.Dockerfile = arm64v8.Dockerfile
Changelog.md = Changelog.md
.github\codeql\codeql-config.yml = .github\codeql\codeql-config.yml
Build\Common.csproj = Build\Common.csproj
.circleci\config.yml = .circleci\config.yml
docker-entrypoint.sh = docker-entrypoint.sh
Dockerfile = Dockerfile
.circleci\run-tests.sh = .circleci\run-tests.sh
Build\Version.csproj = Build\Version.csproj
EndProjectSection