Enable keycloak health checks #14
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: .NET Console CD | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: platform/console/ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Write release version | |
run: | | |
VERSION=${GITHUB_REF_NAME#v} | |
echo Version: $VERSION | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Build | |
run: dotnet build --no-restore --configuration Release /p:Version=${VERSION} | |
- name: Test | |
run: dotnet test --no-build --configuration Release --verbosity normal | |
- name: Publish Client | |
run: dotnet publish --no-build --configuration Release --verbosity normal HQ.ConsoleClient/ --output dist/console-client/ | |
- name: Upload Client Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: platform-console-client | |
path: platform/console/dist/console-client/** | |
if-no-files-found: error | |
publish: | |
runs-on: ubuntu-latest | |
needs: build | |
defaults: | |
run: | |
working-directory: platform/console/ | |
permissions: | |
contents: 'read' | |
packages: 'write' | |
env: | |
REGISTRY: ghcr.io | |
REPO_NAME: ${{ github.repository }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: platform-console-client | |
path: platform/console/dist/console-client/ | |
- name: Set output | |
id: vars | |
run: | | |
echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
echo "version=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_OUTPUT | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GHCR | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Client to ghcr | |
uses: docker/build-push-action@v3 | |
with: | |
file: platform/console/HQ.ConsoleClient/Dockerfile | |
context: platform/console/dist/console-client/ | |
push: true | |
tags: ${{ env.REGISTRY }}/${{ env.REPO_NAME }}-console-client:${{ steps.vars.outputs.tag }} | |
build-args: | | |
VERSION=${{ steps.vars.outputs.version }} |