Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/magefile/mage-action

GitHub Action for Mage
https://github.com/magefile/mage-action

actions buildscript github-actions golang mage make

Last synced: about 1 month ago
JSON representation

GitHub Action for Mage

Awesome Lists containing this project

README

        


Mage Logo

Mage Action


GitHub Action for Mage



GitHub release
GitHub marketplace
Test workflow
Codecov
Become a sponsor

___

![Mage Action](.github/mage-action.png)

* [Usage](#usage)
* [Customizing](#customizing)
* [inputs](#inputs)
* [License](#license)

## Usage

### Quick start

```yaml
name: mage

on:
pull_request:
push:

jobs:
mage:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Go
uses: actions/setup-go@v5
-
name: Run Mage
uses: magefile/mage-action@v3
with:
version: latest
args: build
```

### Install Only

```yaml
name: mage

on:
pull_request:
push:

jobs:
mage:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Go
uses: actions/setup-go@v5
-
name: Run Mage
uses: magefile/mage-action@v3
with:
install-only: true
-
name: Show Mage version
run: mage --version
```

## Customizing

### inputs

The following inputs can be used as `step.with` keys:

| Name | Type | Default | Description |
|----------------|--------|----------|-------------------------------------------|
| `version` | String | `latest` | Mage version. Example: `v1.9.0` |
| `args` | String | | Arguments to pass to Mage |
| `workdir` | String | `.` | Working directory (below repository root) |
| `install-only` | Bool | `false` | Just install Mage |

## License

MIT. See `LICENSE` for more details.