diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..67d247d --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: + +- package-ecosystem: "nuget" + directory: "/" + schedule: + interval: "daily" + +- package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..3b166ea --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,22 @@ +tests: +- changed-files: + - any-glob-to-any-file: + - test/**/* + +CI: +- changed-files: + - any-glob-to-any-file: + - .github/workflows/**/* + - .github/dependabot.yml + - .github/codecov.yml + - .github/labeler.yml + +code style: +- changed-files: + - any-glob-to-any-file: + - .editorconfig + +documentation: +- changed-files: + - any-glob-to-any-file: + - README.md diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..c30c48a --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,38 @@ +# https://github.com/github/codeql +# https://github.com/github/codeql-action +name: CodeQL analysis + +on: + push: + branches: [master, dev] + pull_request: + branches: [master, dev] + +jobs: + analyze: + runs-on: ubuntu-latest + + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Setup .NET SDK + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 7.0.x + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + queries: security-and-quality + languages: csharp + + - name: Install dependencies + run: dotnet restore + + - name: Build solution + + run: dotnet build --no-restore + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml new file mode 100644 index 0000000..f34d7e1 --- /dev/null +++ b/.github/workflows/label.yml @@ -0,0 +1,21 @@ +# This workflow will triage pull requests and apply a label based on the +# paths that are modified in the pull request. +# +# To use this workflow, you will need to set up a .github/labeler.yml +# file with configuration. For more information, see: +# https://github.com/actions/labeler/blob/master/README.md + +name: Labeler +on: + pull_request_target: + types: + - opened # when PR is opened + +jobs: + label: + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + continue-on-error: true diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..bd21f4d --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,22 @@ +name: Mark stale issues and pull requests + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'This issue was marked as stale since it has not been active for a long time' + stale-pr-message: 'This pull request was marked as stale since it has not been active for a long time' + stale-issue-label: 'stale' + stale-pr-label: 'stale' + days-before-stale: 30 + days-before-close: 60 + exempt-issue-label: 'not so stale' + exempt-pr-label: 'not so stale' + operations-per-run: 30 diff --git a/serilog-formatting-compact.sln b/serilog-formatting-compact.sln index 336cab0..af669e5 100644 --- a/serilog-formatting-compact.sln +++ b/serilog-formatting-compact.sln @@ -22,6 +22,19 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Formatting.Compact" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Formatting.Compact.Tests", "test\Serilog.Formatting.Compact.Tests\Serilog.Formatting.Compact.Tests.csproj", "{BAEECC42-EC0C-4955-8AA1-BD3F4F0F4AAD}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{41318B5C-7F2D-4DC9-B473-00FB933DA396}" + ProjectSection(SolutionItems) = preProject + .github\dependabot.yml = .github\dependabot.yml + .github\labeler.yml = .github\labeler.yml + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{CE8D23A2-D269-4C24-8C5F-2CFC8DC92C8E}" + ProjectSection(SolutionItems) = preProject + .github\workflows\codeql-analysis.yml = .github\workflows\codeql-analysis.yml + .github\workflows\label.yml = .github\workflows\label.yml + .github\workflows\stale.yml = .github\workflows\stale.yml + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,5 +56,9 @@ Global GlobalSection(NestedProjects) = preSolution {E0BB862A-8B2C-46B5-9C90-B2F94C32EAB3} = {037440DE-440B-4129-9F7A-09B42D00397E} {BAEECC42-EC0C-4955-8AA1-BD3F4F0F4AAD} = {67B1C971-75EE-4ABE-B184-66AAC8D9D572} + {CE8D23A2-D269-4C24-8C5F-2CFC8DC92C8E} = {41318B5C-7F2D-4DC9-B473-00FB933DA396} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {821D6048-A7EE-4384-B329-C3C351E5826F} EndGlobalSection EndGlobal