diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 95269dbc..aed4c099 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -14,8 +14,19 @@ jobs: with: path: | _build + .cargo deps - key: ${{ runner.os }}-build-deps-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-deps-${{ hashFiles('mix.lock') }} + + - name: Enable caching + run: | + # Disable volumes so caching can take effect + sed -i -Ee 's/- app_[a-z]+_data:.*$//g' docker-compose.yml + + # Make ourselves the owner + echo "RUN addgroup -g $(id -g) -S appgroup && adduser -u $(id -u) -S appuser -G appgroup" >> docker/app/Dockerfile + echo "USER appuser" >> docker/app/Dockerfile + echo "RUN mix local.hex --force && mix local.rebar --force" >> docker/app/Dockerfile - run: docker compose pull - run: docker compose build