diff --git a/.github/workflows/changelogs.yml b/.github/workflows/changelogs.yml index 9c1e2ef70e8..0ee8da9fda3 100644 --- a/.github/workflows/changelogs.yml +++ b/.github/workflows/changelogs.yml @@ -33,6 +33,14 @@ jobs: with: path: ~/.cabal/store key: linux-store-changelogs + # See https://github.com/haskell/cabal/pull/8739 + - name: Sudo chmod to permit ghcup to update its cache + run: | + if [[ "${{ runner.os }}" == "Linux" ]]; then + sudo mkdir -p /usr/local/.ghcup/cache + sudo chown -R $USER /usr/local/.ghcup + sudo chmod -R 777 /usr/local/.ghcup + fi - name: ghcup run: | ghcup config set cache true diff --git a/.github/workflows/whitespace.yml b/.github/workflows/whitespace.yml index 0eddc2f7307..1254f7ccc4e 100644 --- a/.github/workflows/whitespace.yml +++ b/.github/workflows/whitespace.yml @@ -31,6 +31,15 @@ jobs: path: "~/.local/bin" key: fix-whitespace-${{ env.fix-whitespace-ver }} + # See https://github.com/haskell/cabal/pull/8739 + - name: Sudo chmod to permit ghcup to update its cache + run: | + if [[ "${{ runner.os }}" == "Linux" ]]; then + sudo mkdir -p /usr/local/.ghcup/cache + sudo chown -R $USER /usr/local/.ghcup + sudo chmod -R 777 /usr/local/.ghcup + fi + - uses: haskell/actions/setup@v2 if: ${{ !steps.cache.outputs.cache-hit }} with: