cake-build / cake-action

:cake::octocat: Run Cake (C# Make) scripts in your GitHub Actions workflows.

Home Page:https://cakebuild.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using the Cake Action multiple times in the same build causes the workflow to fail

ecampidoglio opened this issue · comments

Right now, if you use the Cake Action in multiple steps within the same build definition, like in this example:

steps:
  - name: Compile
    uses: ecampidoglio/cake-action@v1.0.1
    with:
      target: Compile
  - name: Run the tests
    uses: ecampidoglio/cake-action@v1.0.1
    with:
      target: Test

The second step will fail with the following error message:

dotnet tool install --tool-path tools Cake.Tool
Tool 'cake.tool' is already installed.
##[error]The process 'dotnet' failed with exit code 1

That's because the Cake Action tries to install the Cake.Tool before every run, which obviously doesn't work if the tool has already been installed by a previous instance.