Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
settings

GitHub Action

Mage Action

v2.4.0

Mage Action

settings

Mage Action

GitHub Action for Mage, a Make/rake-like build tool using Go

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Mage Action

uses: magefile/mage-action@v2.4.0

Learn more about this action in magefile/mage-action

Choose a version

Mage Logo

Mage Action

GitHub Action for Mage

GitHub release GitHub marketplace Test workflow Codecov Become a sponsor


Mage Action

Usage

Quick start

name: mage

on:
  pull_request:
  push:

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

For detailed instructions please follow GitHub Actions workflow syntax.

Install Only

name: mage

on:
  pull_request:
  push:

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

Customizing

inputs

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.