From e40bfed90cd4894c7d61eba274e19952e12bd966 Mon Sep 17 00:00:00 2001 From: pierre Date: Mon, 4 Nov 2024 14:56:08 +0000 Subject: [PATCH] try caching again --- .gitea/workflows/dotnetbuild_runner.yaml | 35 ++++++++++++++++++++---- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/dotnetbuild_runner.yaml b/.gitea/workflows/dotnetbuild_runner.yaml index 14b987a..d3b50bf 100644 --- a/.gitea/workflows/dotnetbuild_runner.yaml +++ b/.gitea/workflows/dotnetbuild_runner.yaml @@ -4,8 +4,8 @@ on: [push] jobs: Explore-Gitea-Actions: -# env: -# RUNNER_TOOL_CACHE: /toolcache # Runner Tool Cache + env: + DOTNET_INSTALL_DIR: '.\.dotnet' strategy: matrix: dotnet-version: [ '8.0.x' ] @@ -13,12 +13,27 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Setup dotnet + + - name: Cache dotnet + id: cache-dotnet + uses: actions/cache@v3 + with: + path: ${{ env.DOTNET_INSTALL_DIR }} + key: ${{ runner.os }}-dotnet-${{ matrix.dotnet-version }} + restore-keys: ${{ runner.os }}-dotnet-${{ matrix.dotnet-version }} + + - name: Install dotnet + if: ${{ steps.cache-dotnet.outputs.cache-hit != 'true' }} uses: actions/setup-dotnet@v3 with: dotnet-version: ${{ matrix.dotnet-version }} - cache: true - cache-dependency-path: packages.lock.json + +# - name: Setup dotnet +# uses: actions/setup-dotnet@v3 +# with: +# dotnet-version: ${{ matrix.dotnet-version }} +# cache: true +# cache-dependency-path: packages.lock.json - name: Install dependencies run: dotnet restore - name: Test with dotnet @@ -43,3 +58,13 @@ jobs: author_email: pierre@geeraert.eu message: 'automated push of build' add: '/workspace/pi-ux-ce/Simpsons_generator/bin/Debug/net8.0/Simpsons_generator.exe' + - name: git push changes + uses: appleboy/git-push-action@v0.0.2 + with: + author_email: pierre@geeraert.eu + author_name: Pierre + branch: main + commit: true + commit_message: "[skip ci] Updated changes by gitea bot" + remote: git@gitea.tryton.geeraert.eu:pi-ux-ce/Simpsons_generator.git + ssh_key: ${{ secrets.DEPLOY_KEY }}