Skip to content

lens0021/amber-script-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

amber-script-action

Linter

Run arbitrary Amber script via GitHub Actions. Inspired by actions/github-script.

Note

This is a composite action because I want less maintaining costs. There is a limitation of composite action itself:

Usage

See action.yaml

- uses: lens0021/amber-script-action@v1
  with:
    # The script to run.
    script: ""

    # The version to use.
    # Examples: 0.4.0-alpha, 0.3.5-alpha
    # Default: 0.4.0-alpha
    amber-version: ""

    # Whether to cache Amber binaries and the compiled bash scripts
    # Default: true
    enable-cache: ""

    # The path to store Amber binaries and the compiled bash scripts.
    # If empty string is given, the used path depends on the runner.
    # Default (Linux): '/home/runner/.amber-script-action'
    # Default (Mac): '/Users/runner/.amber-script-action'
    cache-path: ""

Basic:

on: push

jobs:
  hello-world:
    runs-on: ubuntu-latest
    steps:
      - uses: lens0021/amber-script-action@v1
        with:
          script: |
            const msg = "Hello World!"
            echo msg
            echo "The length of the previous message is {len msg}."

When to Use This Action

This action is designed for light-weight inline scripting directly in your workflow files.

If you need to execute larger Amber programs from separate files, use lens0021/setup-amber instead:

- uses: lens0021/setup-amber@v2
  with:
    amber-version: 0.5.1-alpha
- run: amber your-script.ab

This approach gives you proper syntax highlighting, LSP integration, and keeps your workflow files concise.

About

Run arbitrary Amber script via GitHub Actions.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Contributors 4

  •  
  •  
  •  
  •