Fixed a bug and added redeploy step.

This commit is contained in:
mc
2025-07-06 10:30:31 +02:00
parent a44912ac87
commit f49705b70f
2 changed files with 12 additions and 1 deletions
@@ -21,3 +21,9 @@ jobs:
IMAGE=gitea.masita.net/mc/messengerapi:latest IMAGE=gitea.masita.net/mc/messengerapi:latest
docker build -t $IMAGE . docker build -t $IMAGE .
docker push $IMAGE docker push $IMAGE
- name: Redeploy Portainer Stack
run: |
curl -X POST "${{ secrets.PORTAINER_URL }}/api/stacks/${{ secrets. PORTAINER_STACK_ID_MESSENGER_API_DEVELOP }}/redeploy" \
-H "Authorization: Bearer ${{ secrets.PORTAINER_TOKEN }}" \
-H "Content-Type: application/json"
@@ -6,6 +6,11 @@ namespace MessengerApi.Configuration.Parsers
{ {
public static PersistenceTypes Parse(string value) public static PersistenceTypes Parse(string value)
{ {
if (string.IsNullOrWhiteSpace(value))
{
return PersistenceTypes.Sql;
}
return (PersistenceTypes)Enum.Parse(typeof(PersistenceTypes), value, true); return (PersistenceTypes)Enum.Parse(typeof(PersistenceTypes), value, true);
} }
} }