Skip to content

Mage Github action appears to download mage on every run without caching #264

@joshuacc

Description

@joshuacc

Behaviour

Steps to reproduce this issue

  1. Set up a Github action that includes the mage action as a step
  2. Run the action multiple times

Expected behaviour

It should download mage on the first run, but not subsequent runs.

Actual behaviour

It downloads mage on every run.

I believe this is because the action never attempts to check if the mage executable is in the cache and skip the download if available. The tc.find() method is never invoked in the installer.

Configuration

name: mage
on: 
  pull_request:
    branches:
      - main
  push:
    branches:
      - main


jobs:
  build:
    name: mage build
    runs-on: windows-latest

    steps:
      - uses: actions/checkout@v3
      - name: Setup Go
        uses: actions/setup-go@v3
        with:
          go-version: '1.19.x'
      - name: Install dependencies
        run: go get .
      - name: Run Mage
        uses: magefile/mage-action@v2
        with:
          version: latest
          args: verify
      - name: Codecov
        uses: codecov/codecov-action@v3.1.1
        with:
          token: ${{ secrets.CODECOV_TOKEN }}

Logs

logs_104.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions