cake-build / cake-action

:cake::octocat: Run Cake (C# Make) scripts in your GitHub Actions workflows.
https://cakebuild.net
MIT License
45 stars 13 forks source link

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

Closed ecampidoglio closed 4 years ago

ecampidoglio commented 4 years ago

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.

ecampidoglio commented 4 years ago

Fixed in e24c3e5.