Skip to content

Commit

Permalink
chore: update workflows to match new branch structure
Browse files Browse the repository at this point in the history
  • Loading branch information
buehler authored Sep 29, 2023
1 parent d6031c6 commit 9b0ce08
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 85 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dotnet-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: .NET Release
on:
push:
branches:
- master
- next
- main
- release

jobs:
semantic-release:
Expand Down
37 changes: 7 additions & 30 deletions .github/workflows/dotnet-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,16 @@ name: .NET Testing
on:
pull_request:
branches:
- "**"
- '**'

concurrency:
group: testing-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Execute Test ${{ matrix.project }}
name: Testing
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
include:
- project: KubeOps.KubernetesClient.Test
kubernetes: true
- project: KubeOps.Test
kubernetes: false
- project: KubeOps.Templates.Test
kubernetes: false
- project: KubeOps.TestOperator.Test
kubernetes: false
steps:
- uses: actions/checkout@v3

Expand All @@ -31,21 +23,6 @@ jobs:

- name: Create Kubernetes Cluster
uses: helm/[email protected]
if: ${{ matrix.kubernetes == true }}

- name: Execute Tests
run: dotnet test --configuration Release tests/${{ matrix.project }}

result:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Final Results
needs: [test]
steps:
- run: |
result="${{ needs.test.result }}"
if [[ $result == "success" || $result == "skipped" ]]; then
exit 0
else
exit 1
fi
run: dotnet test --configuration Release
51 changes: 7 additions & 44 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy GitHub Pages
on:
push:
branches:
- master
- main

workflow_dispatch:

Expand All @@ -21,55 +21,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1

- run: mkdir public

- name: Build Index
uses: jaywcjlove/markdown-to-html-cli@main
with:
source: res/docs_index.md
output: public/index.html
github-corners: https://github.com/buehler/dotnet-operator-sdk

- name: Build Contribution
uses: jaywcjlove/markdown-to-html-cli@main
with:
source: CONTRIBUTING.md
output: public/contribution.html
github-corners: https://github.com/buehler/dotnet-operator-sdk

- name: Build KubeOps
uses: jaywcjlove/markdown-to-html-cli@main
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
source: src/KubeOps/README.md
output: public/kubeops.html
github-corners: https://github.com/buehler/dotnet-operator-sdk/tree/master/src/KubeOps
dotnet-version: 7.x

- name: Build KubeOps.KubernetesClient
uses: jaywcjlove/markdown-to-html-cli@main
with:
source: src/KubeOps.KubernetesClient/README.md
output: public/kubeops-kubernetesclient.html
github-corners: https://github.com/buehler/dotnet-operator-sdk/tree/master/src/KubeOps.KubernetesClient
- run: dotnet tool restore

- name: Build KubeOps.Templates
uses: jaywcjlove/markdown-to-html-cli@main
with:
source: src/KubeOps.Templates/README.md
output: public/kubeops-templates.html
github-corners: https://github.com/buehler/dotnet-operator-sdk/tree/master/src/KubeOps.Templates

- name: Build KubeOps.Testing
uses: jaywcjlove/markdown-to-html-cli@main
with:
source: src/KubeOps.Testing/README.md
output: public/kubeops-testing.html
github-corners: https://github.com/buehler/dotnet-operator-sdk/tree/master/src/KubeOps.Testing
- run: dotnet docfx

- uses: actions/upload-pages-artifact@v1
with:
path: public
path: _site

- uses: actions/deploy-pages@v1
11 changes: 8 additions & 3 deletions .github/workflows/security-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ name: Code Security Testing
on:
pull_request:
branches:
- master
- main
- release
schedule:
- cron: "0 20 * * 5"
- cron: '0 20 * * 5'

concurrency:
group: security-${{ github.ref }}
cancel-in-progress: true

jobs:
codeQL:
Expand All @@ -15,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: ["csharp"]
language: ['csharp']

steps:
- uses: actions/checkout@v3
Expand Down
16 changes: 10 additions & 6 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{
"debug": true,
"branches": [
"master",
{
"name": "next",
"prerelease": "prerelease"
}
"name": "maintenance/7.x",
"range": "7.x"
},
{
"name": "main",
"prerelease": "pre"
},
"release"
],
"plugins": [
"@semantic-release/commit-analyzer",
Expand All @@ -29,10 +33,10 @@
"@semantic-release/github",
{
"successComment": false,
"failComment": false,
"failComment": true,
"assets": [
{
"path": "artifacts/*.nupkg"
"path": "src/**/bin/Release/**/*.nupkg"
}
]
}
Expand Down

0 comments on commit 9b0ce08

Please sign in to comment.