From 9c4c56ca86f1e0bb01087fccfbdbf8467602bd07 Mon Sep 17 00:00:00 2001 From: Timothy Schenk Date: Thu, 23 Jan 2025 18:25:21 +0100 Subject: [PATCH] ci: attempt3 Signed-off-by: Timothy Schenk --- .gitea/workflows/server.yaml | 14 ++++++++++++++ .gitea/workflows/server_pr.yaml | 12 ++++++++++++ .gitea/workflows/server_qa.yaml | 17 +++++++++++++++-- qodana.yaml | 2 ++ 4 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 qodana.yaml diff --git a/.gitea/workflows/server.yaml b/.gitea/workflows/server.yaml index f82903b..a054ca5 100644 --- a/.gitea/workflows/server.yaml +++ b/.gitea/workflows/server.yaml @@ -12,6 +12,8 @@ on: jobs: preprocess: + env: + RUNNER_TOOL_CACHE: /toolcache runs-on: ubuntu-latest outputs: sanitized_branch_name: ${{ steps.sanitize.outputs.sanitized_branch_name }} @@ -21,6 +23,8 @@ jobs: run: echo "::set-output name=sanitized_branch_name::$(echo ${{ github.ref_name }} | sed 's/\//-/g')" build: + env: + RUNNER_TOOL_CACHE: /toolcache runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -35,6 +39,8 @@ jobs: dotnet build Continuity.AuthServer -c Release sonarqube: + env: + RUNNER_TOOL_CACHE: /toolcache needs: build runs-on: ubuntu-latest container: catthehacker/ubuntu:act-latest@sha256:5f2ff408985b10de9da4a8ea735b7f07d4f98c61608180ebb8964deb37f7580a @@ -68,6 +74,8 @@ jobs: dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" sbom-scan: + env: + RUNNER_TOOL_CACHE: /toolcache needs: build runs-on: ubuntu-latest steps: @@ -98,6 +106,8 @@ jobs: bomFilename: ${{ github.workspace }}/bom.xml container-build: + env: + RUNNER_TOOL_CACHE: /toolcache runs-on: ubuntu-latest container: catthehacker/ubuntu:act-latest@sha256:5f2ff408985b10de9da4a8ea735b7f07d4f98c61608180ebb8964deb37f7580a needs: [build, preprocess] @@ -138,6 +148,8 @@ jobs: platforms: linux/amd64, linux/arm64 container-sbom-scan: + env: + RUNNER_TOOL_CACHE: /toolcache needs: [container-build, preprocess] runs-on: ubuntu-latest container: catthehacker/ubuntu:act-latest@sha256:5f2ff408985b10de9da4a8ea735b7f07d4f98c61608180ebb8964deb37f7580a @@ -179,6 +191,8 @@ jobs: bomFilename: ${{ github.workspace }}/container-bom.json generate-licences: + env: + RUNNER_TOOL_CACHE: /toolcache needs: [build, preprocess] runs-on: ubuntu-latest container: catthehacker/ubuntu:act-latest@sha256:5f2ff408985b10de9da4a8ea735b7f07d4f98c61608180ebb8964deb37f7580a diff --git a/.gitea/workflows/server_pr.yaml b/.gitea/workflows/server_pr.yaml index bf7718e..4b1a54f 100644 --- a/.gitea/workflows/server_pr.yaml +++ b/.gitea/workflows/server_pr.yaml @@ -9,6 +9,8 @@ on: jobs: preprocess: + env: + RUNNER_TOOL_CACHE: /toolcache runs-on: ubuntu-latest outputs: sanitized_branch_name: ${{ steps.sanitize.outputs.sanitized_branch_name }} @@ -18,6 +20,8 @@ jobs: run: echo "::set-output name=sanitized_branch_name::$(echo ${{ github.ref_name }} | sed 's/\//-/g')" build: + env: + RUNNER_TOOL_CACHE: /toolcache runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -32,6 +36,8 @@ jobs: dotnet build Continuity.AuthServer -c Release sbom-scan: + env: + RUNNER_TOOL_CACHE: /toolcache needs: build runs-on: ubuntu-latest steps: @@ -62,6 +68,8 @@ jobs: bomFilename: ${{ github.workspace }}/bom.xml container-build: + env: + RUNNER_TOOL_CACHE: /toolcache runs-on: ubuntu-latest container: catthehacker/ubuntu:act-latest@sha256:5f2ff408985b10de9da4a8ea735b7f07d4f98c61608180ebb8964deb37f7580a needs: [build, preprocess] @@ -102,6 +110,8 @@ jobs: platforms: linux/amd64, linux/arm64 container-sbom-scan: + env: + RUNNER_TOOL_CACHE: /toolcache needs: [container-build, preprocess] runs-on: ubuntu-latest container: catthehacker/ubuntu:act-latest@sha256:5f2ff408985b10de9da4a8ea735b7f07d4f98c61608180ebb8964deb37f7580a @@ -143,6 +153,8 @@ jobs: bomFilename: ${{ github.workspace }}/container-bom.json generate-licences: + env: + RUNNER_TOOL_CACHE: /toolcache needs: [build, preprocess] runs-on: ubuntu-latest container: catthehacker/ubuntu:act-latest@sha256:5f2ff408985b10de9da4a8ea735b7f07d4f98c61608180ebb8964deb37f7580a diff --git a/.gitea/workflows/server_qa.yaml b/.gitea/workflows/server_qa.yaml index 005e314..9fa04d4 100644 --- a/.gitea/workflows/server_qa.yaml +++ b/.gitea/workflows/server_qa.yaml @@ -8,6 +8,8 @@ on: jobs: preprocess: + env: + RUNNER_TOOL_CACHE: /toolcache runs-on: ubuntu-latest outputs: sanitized_branch_name: ${{ steps.sanitize.outputs.sanitized_branch_name }} @@ -17,9 +19,18 @@ jobs: run: echo "::set-output name=sanitized_branch_name::$(echo ${{ github.ref_name }} | sed 's/\//-/g')" build: + env: + RUNNER_TOOL_CACHE: /toolcache runs-on: ubuntu-latest + container: ghcr.io/catthehacker/ubuntu:act-latest steps: - uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + cache-image: true + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Setup dotnet uses: https://github.com/actions/setup-dotnet@v3 with: @@ -29,10 +40,12 @@ jobs: - name: Build run: | dotnet build Continuity.AuthServer -c Release + mkdir /tmp/qodana/ + mkdir /tmp/qodana/caches - name: Qodana Scan uses: https://github.com/JetBrains/qodana-action@v2024.3 with: - # args: --linter,jetbrains/qodana-dotnet:2024.3 - # args: --linter,jetbrains/qodana-cdnet:2024.3-eap + use-caches: false + use-cache: false env: QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} diff --git a/qodana.yaml b/qodana.yaml new file mode 100644 index 0000000..be7bd66 --- /dev/null +++ b/qodana.yaml @@ -0,0 +1,2 @@ +version: '1.0' +linter: jetbrains/qodana-dotnet:2024.3