Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: inline Cake script support💡 #53

Open
devlead opened this issue Mar 27, 2024 · 4 comments
Open

Feature request: inline Cake script support💡 #53

devlead opened this issue Mar 27, 2024 · 4 comments
Labels
pending investigation The issue needs to be investigated further

Comments

@devlead
Copy link
Member

devlead commented Mar 27, 2024

Many GitHub script actions support inline scripts i.e. Azure CLI task

      with:
        inlineScript: |
          az account show
          az storage -h

When doing a Frosting bootstrapper workaround until #43 is solved I did something like

      - name: Create Script Bootstrapper
        run: |
          echo 'DotNetRun("build/Build.csproj", "--target=GitHub-Actions");' > build.cake

      - name: Run Cake script
        uses: cake-build/cake-action@v2
        with:
          cake-version: 4.0.0

and it struck me that it would be really useful for some scenarios to instead of a small utility shell script able to have a Cake script inline, above could then be

      - name: Run Inline Cake script
        uses: cake-build/cake-action@v2
        with:
          cake-version: 4.0.0
          inlineScript: |
            DotNetRun("build/Build.csproj", "--target=GitHub-Actions");

In my mind, it could just work like a pre- & post-processor to the regular script handling, something like

  1. generate temporary file name/path
  2. pass inline script contents into temporary file name/path
  3. pass temporary file name/path as script-path
  4. clean up the temporary path
@jasells
Copy link

jasells commented Feb 4, 2025

please, please, please!

the work around is pretty ooogly, though functional.

It looks like there may be a completed PR? Is this released?

@devlead
Copy link
Member Author

devlead commented Feb 5, 2025

please, please, please!

the work around is pretty ooogly, though functional.

It looks like there may be a completed PR? Is this released?

I believe this feature is still up for grabs. The issue you linked to adds support for executing Cake Frosting / C# project files.

@jasells
Copy link

jasells commented Feb 5, 2025

Ah, now I see the difference. Then support for running a Cake Frosting .csproj from the GH action should now be fixed? This is the feature I was looking for.

@ecampidoglio
Copy link
Member

ecampidoglio commented Feb 6, 2025

@jasells Support for Cake Frosting is out now in version 3.0.0.

@ecampidoglio ecampidoglio added the pending investigation The issue needs to be investigated further label Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending investigation The issue needs to be investigated further
Projects
None yet
Development

No branches or pull requests

3 participants