cake-build / cake-build/cake-action

Feature request: inline Cake script support💡

Open
#53 4 comments 2 reactions 0 assignees View on GitHub
pending investigation
Dominant language
TypeScript
Stars
51
Forks
12
PR merge metrics
No merged PRs in 30d

Description

Many GitHub script actions support inline scripts i.e. Azure CLI task
```yaml
with:
inlineScript: |
az account show
az storage -h
```

When doing a Frosting bootstrapper workaround until #43 is solved I did something like
```yaml
- 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
```yaml
- 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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the existing regular script handling in the action and how the script-path input is passed through. Compare that flow with the requested inlineScript preprocessing and cleanup steps. Done means a workflow can provide inlineScript to run Cake, while existing script-path workflows continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
build-system, ci-cd
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
43/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.