fix(deps): update kubernetescrdmodelgen to 1.0.0-alpha.610 #505
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CICD | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'main' | |
- 'alpha' | |
- 'beta' | |
pull_request: | |
types: [opened, reopened, synchronize] | |
merge_group: | |
jobs: | |
build-test: | |
name: Build & Test & Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v5 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v5 | |
with: | |
global-json-file: global.json | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Semantic Release Dry Run | |
uses: cycjimmy/semantic-release-action@v4 | |
id: semantic | |
with: | |
dry_run: true | |
extra_plugins: | | |
conventional-changelog-conventionalcommits | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: .NET Build | |
run: dotnet build -c Release -p:Version=${{ (steps.semantic.outputs.new_release_published && steps.semantic.outputs.new_release_version) || '0.0.1' }} | |
- name: .NET Test | |
run: dotnet test -c Release --collect:"XPlat Code Coverage" --logger "trx;LogFileName=test-results.trx" | |
- name: .NET Test SDK | |
working-directory: tests/Function.SDK.CSharp.Tests | |
run: dotnet run -c Release -- --report-xunit-trx --report-xunit-trx-filename test-results.trx --coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml | |
- name: .NET Test Sample | |
working-directory: tests/Function.SDK.CSharp.Sample.Tests | |
run: dotnet run -c Release -- --report-xunit-trx --report-xunit-trx-filename test-results.trx --coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml | |
- name: Coverage | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage.cobertura.xml | |
fail_ci_if_error: true | |
- name: Test Report | |
uses: dorny/test-reporter@v2 | |
if: success() || failure() | |
with: | |
name: Tests | |
path: '**/TestResults/test-results.trx' | |
reporter: dotnet-trx | |
- name: .NET Pack | |
run: dotnet pack -c Release -p:Version=${{ (steps.semantic.outputs.new_release_published && steps.semantic.outputs.new_release_version) || '0.0.1' }} | |
- name: Upload NuGet Packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: NuGet Package | |
path: src/**/*.nupkg | |
- name: Docker Buildx | |
run: docker buildx build --platform linux/amd64,linux/arm64 -t test.loc/function-sdk-csharp-sample --build-arg VERSION=${{ (steps.semantic.outputs.new_release_published && steps.semantic.outputs.new_release_version) || '0.0.1' }} -f src/Function.SDK.CSharp.Sample/Dockerfile src | |
- name: Load Docker Image | |
run: docker buildx build --load --platform $(docker info --format '{{.Architecture}}') -t test.loc/function-sdk-csharp-sample -f src/Function.SDK.CSharp.Sample/Dockerfile src | |
- name: Run Trivy vulnerability scanner | |
uses: aquasecurity/trivy-action@master | |
with: | |
image-ref: 'test.loc/function-sdk-csharp-sample' | |
format: 'table' | |
exit-code: '1' | |
ignore-unfixed: true | |
vuln-type: 'os,library' | |
severity: 'CRITICAL,HIGH' | |
env: | |
TRIVY_DISABLE_VEX_NOTICE: true | |
- name: Semantic Release | |
if: steps.semantic.outputs.new_release_published == 'true' | |
uses: cycjimmy/semantic-release-action@v4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
extra_plugins: | | |
conventional-changelog-conventionalcommits | |
- name: .NET NuGet Push | |
if: steps.semantic.outputs.new_release_published == 'true' | |
run: dotnet nuget push src/**/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} | |
- name: Docker Push | |
if: steps.semantic.outputs.new_release_published == 'true' | |
run: | | |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${GITHUB_ACTOR} --password-stdin | |
docker buildx build --push --platform linux/amd64,linux/arm64 -t ghcr.io/${GITHUB_REPOSITORY,,}/function-sdk-csharp-sample:${{ github.ref_name == 'main' && 'latest' || github.ref_name == 'alpha' && 'alpha' || github.ref_name == 'beta' && 'beta' }} -t ghcr.io/${GITHUB_REPOSITORY,,}/function-sdk-csharp-sample:${{ steps.semantic.outputs.new_release_version }} --build-arg VERSION=${{ steps.semantic.outputs.new_release_version }} -f src/Function.SDK.CSharp.Sample/Dockerfile src |