# A GitHub action to avoid being caught by GitHub zip issues on CI

**URL:** https://discourse.elm-lang.org/t/a-github-action-to-avoid-being-caught-by-github-zip-issues-on-ci/8129
**Category:** Show and Tell
**Created:** [February 2, 2022, 11:31am UTC](https://discourse.elm-lang.org/t/a-github-action-to-avoid-being-caught-by-github-zip-issues-on-ci/8129 "2022-02-02T11:31:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mattpiz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/mattpiz/32/860_2.png) [@mattpiz](https://discourse.elm-lang.org/u/mattpiz)
#### Post date: [February 2, 2022, 11:31am UTC](https://discourse.elm-lang.org/t/a-github-action-to-avoid-being-caught-by-github-zip-issues-on-ci/8129/1 "2022-02-02T11:31:56Z")

</div>

Hey guys! I’m just hearing about the zipball issue on GitHub preventing `elm make` to run. Turns out if your packages are cached, you don’t need to download them 😉 So ironically, GitHub actions caching are a solution to GitHub problems if you are using GitHub.

Some time ago, I published an action to help you do exactly that so I thought I’d relay it again today: [GitHub - mpizenberg/elm-tooling-action: GitHub action to install Elm tools and cache ELM\_HOME](https://github.com/mpizenberg/elm-tooling-action)

The action is pretty nice, since it just requires you to add an `elm-tooling.json` file like this:

```json
{
  "tools": {
    "elm": "0.19.1",
    "elm-format": "0.8.5"
  }
}

```

and to add the following few lines to your `.github/workflows/ci.yml` file and you are set! (Don’t forget to activate action both on PR and main branch).

```yaml
      - name: Install elm, elm-format and cache the ELM_HOME directory
        uses: mpizenberg/elm-tooling-action@v1.2
        with:
          cache-key: elm-home-${{ hashFiles('elm-tooling.json', 'elm.json') }}

```

## Couple remarks

> There is a warning saying that you shouldn’t use it if you have a typical web project with a `package.json` file and follow instead the traditional `elm-tooling-cli` setup.

Well it was me being over cautious, and it seems that both are fine together (let me know if you have issues). So you can add the GH action just for the sake of easy caching of the elm home.

> It doesn’t seem to be up to date

It is enought up to date if you are only interested in caching, elm, and elm-format. If you also want to install the latest elm-test-rs with it, I haven’t updated it yet by lack of time. PRs are welcome, please make it so I can review very easily because I don’t have much time these days.

I hope your projects are back to normal compiling! Otherwise have a look at Martin’s script to build your own cache! [Build ~/.elm cache manually without checking SHA1 hashes · GitHub](https://gist.github.com/Janiczek/b91d19aa83e092493c1ffd850f950995)

❤ And continue building with elm ❤

---

<div class="post-metadata">

### Author: ![lydell](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/lydell/32/178_2.png) [@lydell](https://discourse.elm-lang.org/u/lydell)
#### Post date: [February 3, 2022, 4:21pm UTC](https://discourse.elm-lang.org/t/a-github-action-to-avoid-being-caught-by-github-zip-issues-on-ci/8129/2 "2022-02-03T16:21:51Z")

</div>

Small note: [https://docs.github.com/en/actions/advanced-guides/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy](https://docs.github.com/en/actions/advanced-guides/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy)

> GitHub will remove any cache entries that have not been accessed in over 7 days.

So if you have a not very active repo, you might not be saved by cache.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/1X/50a05e53677a2c3b47776d7abd0f113eb50193a1.png) [@system](https://discourse.elm-lang.org/u/system)
#### Post date: [February 13, 2022, 4:22pm UTC](https://discourse.elm-lang.org/t/a-github-action-to-avoid-being-caught-by-github-zip-issues-on-ci/8129/3 "2022-02-13T16:22:50Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
