Bump MudBlazor from 6.15.0 to 6.17.0 #162
Workflow file for this run
This file contains 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: Splitracker CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: {} | |
env: | |
HELM_VERSION: v3.11.1 | |
jobs: | |
build: | |
name: Build & Test | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.choose_version.outputs.version }} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up .NET SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
# NET 6 for Raven tests | |
dotnet-version: | | |
6.0.x | |
8.0.x | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget | |
- name: Choose Version | |
id: choose_version | |
run: | | |
version='1.1.${{ github.run_number }}' | |
echo "version=$version" >> $GITHUB_OUTPUT | |
- name: Install dependencies | |
run: dotnet restore --runtime linux-x64 --verbosity=normal /p:Version=${{ steps.choose_version.outputs.version }} | |
- name: Build | |
run: dotnet build --configuration=Release --no-restore --verbosity=normal /p:Version=${{ steps.choose_version.outputs.version }} | |
- name: Test | |
run: dotnet test --configuration=Release --no-restore --no-build --verbosity=normal --results-directory ./TestResults /p:Version=${{ steps.choose_version.outputs.version }} | |
- name: Test Report | |
uses: dorny/test-reporter@v1 | |
if: success() || failure() | |
continue-on-error: true # Dependabot PRs are not allowed to upload things | |
with: | |
name: NUnit Tests | |
path: TestResults/*.trx | |
reporter: dotnet-trx | |
- name: Publish | |
# there is a weird behavior around publish and the generated global.css. With --no-build, the | |
# global.css ends up in the Splitracker.Web (?!) directory on the very first build. | |
run: dotnet publish --configuration=Release --no-restore --verbosity=normal /p:Version=${{ steps.choose_version.outputs.version }} | |
working-directory: ./Splitracker.Web | |
- name: Push docker image | |
if: github.event_name != 'pull_request' | |
run: | | |
set -x | |
docker login --username github --password '${{ secrets.hz_registry_password }}' registry.hz.klauser.link | |
version='${{ steps.choose_version.outputs.version }}' | |
tag="registry.hz.klauser.link/splitracker-web:$version" | |
docker tag splitracker-web:$version "$tag" | |
docker push "$tag" | |
docker logout registry.hz.klauser.link | |
- name: Install helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: ${{ env.HELM_VERSION }} | |
- name: Dry run helm chart | |
if: github.event_name == 'pull_request' | |
run: | | |
echo "Rendering helm chart (not displayed because it contains secrets)" | |
set -x | |
helm template \ | |
--set env=prod \ | |
--values deploy/splitracker/dry-run-values.yaml \ | |
splitracker deploy/splitracker > /dev/null | |
deploy_dev: | |
name: Deploy to dev | |
if: github.event_name != 'pull_request' | |
needs: [build] | |
runs-on: ubuntu-latest | |
environment: | |
name: dev | |
url: https://dev-splitracker.hz.klauser.link | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: ${{ env.HELM_VERSION }} | |
- name: Perform Deployment | |
run: | | |
set -x | |
mkdir ~/.kube | |
echo -n '${{ secrets.KUBECONFIG }}' | base64 -d > ~/.kube/config | |
sed \ | |
-e 's/^version:.*$/version: "${{ needs.build.outputs.version }}"/' \ | |
-e 's/^appVersion:.*$/appVersion: "${{ needs.build.outputs.version }}"/'\ | |
-i deploy/splitracker/Chart.yaml | |
echo "Deploying to DEV" | |
cat deploy/splitracker/Chart.yaml | |
helm upgrade --install --create-namespace --wait \ | |
--namespace splitracker-dev \ | |
--set env=dev \ | |
--set raven.certificatePassword='${{ secrets.RAVEN_DEV_CERTIFICATE_PASSWORD }}' \ | |
--set raven.certificateBase64='${{ secrets.RAVEN_DEV_CERTIFICATE_BASE64 }}' \ | |
--set sso.oidcClientSecret='${{ secrets.OIDC_CLIENT_SECRET }}' \ | |
splitracker deploy/splitracker | |
rm -rf ~/.kube | |
deploy_prod: | |
name: Deploy to prod | |
if: github.event_name != 'pull_request' | |
needs: [build, deploy_dev] | |
runs-on: ubuntu-latest | |
environment: | |
name: prod | |
url: https://splitracker.klauser.link | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: ${{ env.HELM_VERSION }} | |
- name: Perform Deployment | |
run: | | |
set -x | |
mkdir ~/.kube | |
echo -n '${{ secrets.KUBECONFIG }}' | base64 -d > ~/.kube/config | |
sed \ | |
-e 's/^version:.*$/version: "${{ needs.build.outputs.version }}"/' \ | |
-e 's/^appVersion:.*$/appVersion: "${{ needs.build.outputs.version }}"/'\ | |
-i deploy/splitracker/Chart.yaml | |
echo "Deploying to PROD" | |
cat deploy/splitracker/Chart.yaml | |
helm upgrade --install --create-namespace --wait \ | |
--namespace splitracker-prod \ | |
--set env=prod \ | |
--set raven.certificatePassword='${{ secrets.RAVEN_PROD_CERTIFICATE_PASSWORD }}' \ | |
--set raven.certificateBase64='${{ secrets.RAVEN_PROD_CERTIFICATE_BASE64 }}' \ | |
--set sso.oidcClientSecret='${{ secrets.OIDC_CLIENT_SECRET }}' \ | |
splitracker deploy/splitracker | |
rm -rf ~/.kube |