Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
7ba35a0
Version pre5.x
giovanninocco Oct 13, 2023
08f7ea0
Updates change log
giovanninocco Oct 13, 2023
32f4e2c
Bump Serilog.Sinks.ElasticSearch from 8.4.1 to 9.0.3
dependabot[bot] Oct 13, 2023
b17267a
Merge pull request #18 from Genocs/dependabot/nuget/Serilog.Sinks.Ela…
giovanninocco Oct 13, 2023
ac2c429
Bump Serilog.Sinks.Seq from 5.1.0 to 5.2.3
dependabot[bot] Oct 13, 2023
6f527c7
Fix workflow
giovanninocco Oct 13, 2023
8b7b320
Merge pull request #21 from Genocs/dependabot/nuget/Serilog.Sinks.Seq…
giovanninocco Nov 3, 2023
aa54284
removed templates and updated packages
giovanninocco Nov 23, 2023
d860155
Merge branch 'main' of https://github.com/Genocs/genocs-library
giovanninocco Nov 23, 2023
73afdc0
File updates
giovanninocco Nov 25, 2023
2dde44c
Minor fix
giovanninocco Nov 25, 2023
8f32845
Updated clients to net8
giovanninocco Nov 25, 2023
dd10e1a
Pagages updated wip
giovanninocco Nov 25, 2023
5a3ab6d
Cleanup config file
giovanninocco Nov 25, 2023
a7dd458
updated docker files and github actions
giovanninocco Nov 25, 2023
8293914
Added default assembly name
giovanninocco Nov 25, 2023
19f2e02
Fix for pack
giovanninocco Nov 25, 2023
1b3c6a9
Merge pull request #35 from Genocs/NET8
giovanninocco Nov 25, 2023
bb303ea
Added wildcard
giovanninocco Nov 25, 2023
b5a32dd
minor fix
giovanninocco Nov 25, 2023
7c66fc3
Clean warnings
giovanninocco Nov 28, 2023
b21a55e
Before big refactory
giovanninocco Nov 28, 2023
3bb4589
Implemented Mongo functionality
giovanninocco Nov 28, 2023
296abe7
Default mongodb entity with ObjectId
giovanninocco Nov 28, 2023
f6da253
Fix error on Console log
giovanninocco Nov 30, 2023
3d49180
Documentation, updated packages
giovanninocco Dec 7, 2023
9ffe861
Updated project structure
giovanninocco Dec 7, 2023
a8bad21
Disabled Monitoring
giovanninocco Dec 7, 2023
9ad6741
Minor fix
giovanninocco Dec 20, 2023
9ff8abb
Updated Nuget Packages
giovanninocco Dec 26, 2023
8efd5ae
Bump Moq from 4.20.69 to 4.20.70
dependabot[bot] Jan 1, 2024
d620e5d
Bump Microsoft.VisualStudio.Azure.Containers.Tools.Targets
dependabot[bot] Jan 8, 2024
9eb35fa
Bump prometheus-net from 5.0.2 to 8.2.1
dependabot[bot] Jan 8, 2024
9d334d3
Bump Polly from 8.2.0 to 8.2.1
dependabot[bot] Jan 8, 2024
cd58c28
Bump System.IdentityModel.Tokens.Jwt in /src/Genocs.Auth
dependabot[bot] Jan 9, 2024
219ed14
Merge pull request #52 from Genocs/dependabot/nuget/Moq-4.20.70
giovanninocco Jan 17, 2024
b45c4e5
Merge pull request #53 from Genocs/dependabot/nuget/Microsoft.VisualS…
giovanninocco Jan 17, 2024
2f1c185
Merge pull request #55 from Genocs/dependabot/nuget/Polly-8.2.1
giovanninocco Jan 17, 2024
acaf4dd
Merge pull request #56 from Genocs/dependabot/nuget/src/Genocs.Auth/S…
giovanninocco Jan 17, 2024
25ec643
Merge pull request #54 from Genocs/dependabot/nuget/prometheus-net-8.2.1
giovanninocco Jan 17, 2024
9f04ab5
Updated packages
giovanninocco Jan 23, 2024
c58e4a2
updates for 2024
giovanninocco Jan 23, 2024
3d4c17e
Added documentation and more control over types
giovanninocco Feb 8, 2024
02c2be7
Setup configuration
giovanninocco Feb 9, 2024
99ac637
Reverted reference framework
giovanninocco Feb 19, 2024
0af67b8
Fix
giovanninocco Feb 19, 2024
3887c17
Updated nuget packages to prepare for removing legacy behavior
giovanninocco Mar 31, 2024
7b8bf5d
Updated github action
giovanninocco Apr 4, 2024
cc0d478
Refactored code for readability and updated variable types
giovanninocco May 4, 2024
8b9b1b5
Updated multiple packages and improved code readability
giovanninocco May 18, 2024
cc6bd4d
Updated project dependencies and refactored security settings
giovanninocco May 18, 2024
ccaf4a5
Updated comments, attributes, methods, and dependencies across multip…
giovanninocco May 19, 2024
762c51f
Refactor code for improved readability and update variable types
giovanninocco Jun 6, 2024
227e968
Refactor and enhance codebase for clarity
giovanninocco Jun 12, 2024
bd2a025
Integrate Azure Key Vault & Update Packages
giovanninocco Jun 12, 2024
bb92cdb
Update package versions across projects
giovanninocco Jun 12, 2024
b864cc9
Refactor and enhance JWT handling and security
giovanninocco Jun 15, 2024
736964d
Refactor and enhance JWT handling and security
giovanninocco Jun 15, 2024
bb5ea59
Refactor auth/config handling and enhance security
giovanninocco Jun 18, 2024
3a28fd1
Added auth features and AuthorizedController
giovanninocco Jun 19, 2024
7bae2b7
Sincronize naming conventions
GioemaNocco Jun 22, 2024
34b35b2
Cleanup data after uniform naming conventions
GioemaNocco Jun 22, 2024
3b27e46
Add verification service client and models
GioemaNocco Jul 4, 2024
504fc40
Refactor configs and update docs across projects
giovanninocco Jul 7, 2024
94db485
Merge issues
giovanninocco Jul 7, 2024
cc6c097
Merge issues
giovanninocco Jul 7, 2024
5977b8c
Refactor config naming and add new options
giovanninocco Jul 7, 2024
0cde64f
Update dependencies and refactor namespaces
giovanninocco Jul 7, 2024
1058ea1
Update app config for logging, security, and more
giovanninocco Jul 7, 2024
bf42a88
Enhanced app config and documentation
giovanninocco Jul 7, 2024
ede9ad3
Refactor configuration naming conventions and add new options
giovanninocco Jul 7, 2024
06bb32f
Refactor auth and update docs
giovanninocco Jul 11, 2024
85198fb
Refactor auth and update docs
giovanninocco Jul 19, 2024
a63d816
Refactor auth and update docs
giovanninocco Jul 19, 2024
b8a8e4c
Merge pull request #86 from Genocs/ver_600
giovanninocco Jul 19, 2024
c61eab2
Update various NuGet packages across multiple projects
giovanninocco Jul 24, 2024
63533a2
Refactor and update dependencies and logging level
giovanninocco Jul 27, 2024
d634694
Update packages, fix typos, and improve code formatting
giovanninocco Jul 31, 2024
318ca61
Refactor and update dependencies, fix typos, and improve code formatting
giovanninocco Jul 31, 2024
b98629b
Merge pull request #89 from Genocs/ver_600
giovanninocco Jul 31, 2024
6e091e5
Make properties nullable and improve code readability
giovanninocco Aug 6, 2024
87edca1
Refactor interfaces and update Azure Key Vault options
giovanninocco Aug 10, 2024
866463f
Refactor interfaces, update Azure Key Vault options, and improve code…
giovanninocco Aug 21, 2024
c1095a7
Remove CardToken, update configs, and add Oracle setup
giovanninocco Aug 29, 2024
3b45172
Update packages and enhance Azure Key Vault integration
giovanninocco Sep 2, 2024
485db2c
Refactor interfaces, update Azure Key Vault options, and improve code…
giovanninocco Oct 11, 2024
ab02bd7
Refactor README.md and remove unnecessary lines
giovanninocco Oct 11, 2024
088a59a
Update package versions from 6.0.* to 6.1.*
giovanninocco Oct 11, 2024
a1e01bb
Update various NuGet packages across multiple projects
giovanninocco Oct 11, 2024
1eed44b
Refactor: Replace Jaeger with OpenTelemetry
giovanninocco Oct 11, 2024
01adb18
**List of code changes:**
giovanninocco Oct 11, 2024
4e1a3ba
Refactor: Replace Jaeger with OpenTelemetry
giovanninocco Oct 12, 2024
863e6ba
Merge pull request #98 from Genocs/ver_600
giovanninocco Oct 12, 2024
52b5851
Update Roslynator, improve type clarity, and reformat code
giovanninocco Oct 12, 2024
4bbbe88
Refactor and enhance OpenAPI and middleware handling
giovanninocco Oct 19, 2024
21f2798
Enhance Azure setup, null safety, and code quality
giovanninocco Oct 19, 2024
3ea5a05
Add detailed Swagger configuration and options
giovanninocco Oct 20, 2024
5909e0b
Update package versions in workflows and projects
giovanninocco Oct 22, 2024
7a08e96
Update package versions to 6.2.0 in Genocs.HTTP, Genocs.Core, Genocs.…
giovanninocco Oct 22, 2024
328f67e
Update package versions to 6.2.0 in multiple projects
giovanninocco Oct 22, 2024
efc5040
Merge pull request #100 from Genocs/ver_600
giovanninocco Oct 22, 2024
0a2d5be
Update packages, refactor code, and improve readability
giovanninocco Oct 23, 2024
42dfe53
Refactor AzureInitializer and update MongoDB.Driver
giovanninocco Oct 23, 2024
ded3efb
Update packages, enhance JWT options, and refactor configs
GioemaNocco Nov 3, 2024
24589b4
Update project references and improve domain entities
GioemaNocco Nov 3, 2024
ee78547
Update to 6.2.0, replace Jaeger with OpenTelemetry
GioemaNocco Nov 3, 2024
6e9af26
Update Roslynator.Analyzers and adjust framework references
GioemaNocco Nov 3, 2024
34415fa
Update project files and package references
GioemaNocco Nov 3, 2024
950efdb
Update Genocs packages from 6.2.0 to 6.3.0
GioemaNocco Nov 3, 2024
2e5eb47
Update CHANGELOG for v6.3.0 release
GioemaNocco Nov 3, 2024
5c6d592
Merge pull request #106 from Genocs/ver_600
giovanninocco Nov 3, 2024
3ccf665
Refactor Entity and IAggregateRoot for simplicity
GioemaNocco Nov 3, 2024
a21e330
Refactor: Replace IIdentifiable with IEntity
GioemaNocco Nov 4, 2024
c10e995
Standardize property names and update audit fields
GioemaNocco Nov 4, 2024
98e24b1
Refactor MongoDB repository structure and base classes
GioemaNocco Nov 8, 2024
c3a8bac
Refactor MongoDB repository structure and update usings
GioemaNocco Nov 8, 2024
7da092d
Refactor null checks and exception handling
GioemaNocco Nov 8, 2024
106fc31
Update package versions in multiple project files
giovanninocco Nov 10, 2024
713fb84
Update to version 6.3.0 and refactor codebase
giovanninocco Nov 10, 2024
a5f189b
Remove project refs and add using directive
giovanninocco Nov 10, 2024
6fdf470
Update package references to version 6.4.0 across multiple projects
giovanninocco Nov 10, 2024
74a96fd
Update CHANGELOG for v6.4.0 release with recent changes and improvements
giovanninocco Nov 10, 2024
cea45d4
Merge pull request #109 from Genocs/ver_600
giovanninocco Nov 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
270 changes: 270 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,270 @@
root = true

[*]
roslynator_accessibility_modifiers = explicit
roslynator_use_anonymous_function_or_method_group = anonymous_function|method_group
roslynator_enum_has_flag_style = method
roslynator_object_creation_type_style = explicit|implicit|implicit_when_type_is_obvious

indent_style = space

trim_trailing_whitespace = true

insert_final_newline = false

[*.md]
trim_trailing_whitespace = false

[*.json]
indent_size = 2

[*.cs]
dotnet_sort_system_directives_first = true:warning

csharp_style_namespace_declarations = file_scoped:warning

csharp_style_var_for_built_in_types = false:warning

csharp_style_var_when_type_is_apparent = true:warning

csharp_style_var_elsewhere = true:warning

csharp_new_line_before_members_in_anonymous_types = true:warning

# SA1623: Property summary documentation should match accessors
dotnet_diagnostic.SA1623.severity = none

# SA1101: Prefix local calls with this
dotnet_diagnostic.SA1101.severity = none

# SA1642: Constructor summary documentation should begin with standard text
dotnet_diagnostic.SA1642.severity = none

# SA1309: Field names should not begin with underscore
dotnet_diagnostic.SA1309.severity = none

# RCS1194: Implement exception constructors.
dotnet_diagnostic.RCS1194.severity = none

# SA1000: Keywords should be spaced correctly
dotnet_diagnostic.SA1000.severity = none

# SA1124: Do not use regions
dotnet_diagnostic.SA1124.severity = none

# SA1413: Use trailing comma in multi-line initializers
dotnet_diagnostic.SA1413.severity = none

# SA1201: Elements should appear in the correct order
dotnet_diagnostic.SA1201.severity = suggestion

# SA1638: File header file name documentation should match file name
dotnet_diagnostic.SA1638.severity = warning

# SA1633: File should have header
dotnet_diagnostic.SA1633.severity = none

# SA1404: Code analysis suppression should have justification
dotnet_diagnostic.SA1404.severity = none

# SA1206: Declaration keywords should follow order
dotnet_diagnostic.SA1206.severity = none

# CA1040: Avoid empty interfaces
dotnet_diagnostic.CA1040.severity = none

# RCS1012: Use explicit type instead of 'var'
dotnet_diagnostic.RCS1012.severity = none

# RCS1008: Use explicit type instead of 'var'
dotnet_diagnostic.RCS1008.severity = none

# CA1725
dotnet_diagnostic.CA1725.severity = none

# RCS1009: Use explicit type instead of 'var'
dotnet_diagnostic.RCS1009.severity = none

# SA1402: File may only contain a single type
dotnet_diagnostic.SA1402.severity = suggestion

# CA1711
dotnet_diagnostic.CA1711.severity = none

# CA1720: Identifier contains type name
dotnet_diagnostic.CA1720.severity = none

# IDE0022: Use block body for methods
dotnet_diagnostic.IDE0022.severity = none

# SA1011: Closing square brackets should be spaced correctly
dotnet_diagnostic.SA1011.severity = none

# CA1721
dotnet_diagnostic.CA1721.severity = none

# SA1313: Parameter names should begin with lower-case letter
dotnet_diagnostic.SA1313.severity = none

# SecurityIntelliSenseCS: MS Security rules violation
dotnet_diagnostic.SecurityIntelliSenseCS.severity = suggestion

# SA1123: Do not place regions within elements
dotnet_diagnostic.SA1123.severity = none

# RCS1046: Add suffix 'Async' to asynchronous method name
dotnet_diagnostic.RCS1046.severity = warning

# SA1625: Element documentation should not be copied and pasted
dotnet_diagnostic.SA1625.severity = none

# SCS9999
dotnet_diagnostic.SCS9999.severity = none

# RCS1090 Add call to 'ConfigureAwait'
dotnet_diagnostic.RCS1090.severity = none

# RCS1170 Use read-only auto-implemented property
dotnet_diagnostic.RCS1170.severity = none

# SA1649
dotnet_diagnostic.SA1649.severity = none

# RCS1021 Use expression-bodied lambda.
dotnet_diagnostic.RCS1021.severity = none

# RCS1047 Remove suffix 'Async' from non-asynchronous method name.
# dotnet_diagnostic.RCS1047.severity = silent

# SA1600 Elements should be documented
dotnet_diagnostic.SA1600.severity = silent

# CS1591 Missing XML comment for publicly visible type or member
dotnet_diagnostic.CS1591.severity = none

# SA1602: Enumeration items should be documented
dotnet_diagnostic.SA1602.severity = none

# CA1720 Identifier 'Decimal' contains type name
dotnet_diagnostic.CA1720.severity = none

# SA1601: Partial elements should be documented
dotnet_diagnostic.SA1601.severity = silent

# CA1711 Rename type name UserEventHandler so that it does not end in 'EventHandler'
dotnet_diagnostic.CA1711.severity = none

# CA1307: Specify StringComparison for clarity
dotnet_diagnostic.CA1307.severity = none
csharp_using_directive_placement = outside_namespace:silent
csharp_prefer_simple_using_statement = true:suggestion
csharp_prefer_braces = true:silent
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_expression_bodied_methods = false:silent
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = true:silent
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_accessors = true:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_indent_labels = one_less_than_current
csharp_style_prefer_primary_constructors = true:suggestion
csharp_style_prefer_null_check_over_type_check = true:suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_prefer_local_over_anonymous_function = true:suggestion
csharp_prefer_simple_default_expression = true:suggestion
csharp_style_prefer_index_operator = true:suggestion
csharp_style_prefer_range_operator = true:suggestion
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
csharp_style_prefer_tuple_swap = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_prefer_utf8_string_literals = true:suggestion
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
csharp_style_prefer_readonly_struct = true:suggestion
csharp_prefer_static_local_function = true:suggestion
csharp_style_prefer_readonly_struct_member = true:suggestion
csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent
csharp_style_conditional_delegate_call = true:suggestion
csharp_space_around_binary_operators = before_and_after
[*.{cs,vb}]
#### Naming styles ####

# Naming rules

dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i

dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case

dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case

# Symbol specifications

dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =

dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.required_modifiers =

dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =

# Naming styles

dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 4
indent_size = 4
end_of_line = crlf
dotnet_style_prefer_collection_expression = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_compound_assignment = true:suggestion
dotnet_style_prefer_simplified_interpolation = true:suggestion
dotnet_style_namespace_match_folder = true:suggestion
dotnet_style_readonly_field = true:suggestion
dotnet_style_predefined_type_for_member_access = true:silent
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
dotnet_style_allow_statement_immediately_after_block_experimental = true:silent
dotnet_style_allow_multiple_blank_lines_experimental = true:silent
dotnet_code_quality_unused_parameters = all:suggestion
3 changes: 3 additions & 0 deletions templates/template/.env → .env
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
# The IP below should be swapped to your real IP or DNS name, like 192.168.88.248, etc. if testing from remote browsers or mobile devices

PROJECT_EXTERNAL_DNS_NAME_OR_IP=localhost

# The docker image version
DOCKER_IMAGE_TAG=6.0.0
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms
open_collective: genocs
custom: ["https://www.buymeacoffee.com/genocs"]
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "nuget" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly" # How often to check for updates (can be "daily", "weekly" or "monthly")
17 changes: 8 additions & 9 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ name: Build test and pack

on:
push:
branches: ["master"]

branches: [main, develop]
pull_request:
branches: ["master"]
branches: [main, develop]

jobs:
build:
Expand All @@ -14,21 +13,21 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore
run: dotnet build -c Debug --no-restore

- name: Test
run: dotnet test --no-build --verbosity normal
run: dotnet test -c Debug --no-build --verbosity normal

- name: Pack
run: dotnet pack --no-build --verbosity normal
run: dotnet pack -c Debug --no-build --verbosity normal
57 changes: 57 additions & 0 deletions .github/workflows/dockerhub-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# This is a manually triggered dockerhub build and publish

name: Publish to Dockerhub

# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
version:
# Friendly description to be shown in the UI instead of 'name'
description: "Image Version"

# Default value if no value is explicitly provided
default: "6.2.0"

# Input has to be provided for the workflow to run
required: true

jobs:
build:
name: Publish Docker Image
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build -c Debug --no-restore

- name: Test
run: dotnet test --no-build --verbosity normal

- name: Pack
run: dotnet pack --no-build --verbosity normal

- name: Docker Hub Log in
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push image to Dockerhub
run: |
docker build -f webapi.dockerfile -t genocs/demo-webapi:${{ github.event.inputs.version }} -t genocs/demo-webapi:latest .
docker push genocs/demo-webapi:${{ github.event.inputs.version }}
docker push genocs/demo-webapi:latest
Loading