docker-practice / actions-setup-docker

Set up your GitHub Actions workflow with a specific version(18.09,19.03,20.10,nightly) of Docker ON Linux/macOS
93 stars 34 forks source link

The latest version sometimes stuck on macos-latest #18

Closed Morimiue closed 2 years ago

Morimiue commented 2 years ago

See

But sometimes it just works, for example:

I dont know why. According to dapr/cli#965, I set the version to 1.0.8 and it seems work fine, at least for now.

pcit-ce[bot] commented 2 years ago

You can writing some word in a comment to trigger action:

bpmct commented 2 years ago

Has this been fixed?

edit: Ah, I see you can rollback

Yurunsoft commented 2 years ago

1.0.8, 1.0.9 are not working https://github.com/Yurunsoft/php-tdengine/runs/6419048851?check_suite_focus=true

douglascamata commented 2 years ago

Seeing the same issue.

kachkaev commented 2 years ago

Weekly CI checks have been for a few months: https://github.com/docker-practice/actions-setup-docker/actions. Looks like this task no longer works on macOS 🤔 I tried macos-latest, macos-11 and macos-10.15 locally and also downgraded to docker-practice/actions-setup-docker@1.0.8 (times when CI was green). This did not help.

Can anyone suggest alternative ways of running Docker on macOS in GitHub Actions?

khs1994 commented 2 years ago

@kachkaev rollback to https://raw.githubusercontent.com/Homebrew/homebrew-cask/fe866ec0765de141599745f03e215452db7f511b/Casks/docker.rb

kachkaev commented 2 years ago

@khs1994 could you please elaborate on the alternative approach if you know it? Looks like I'm not the only person who struggles with running the action.

If the action can no longer work on macos — no worries at all, it'd be just great that folks had a new recipe available. I’ve been searching this topic for a few hours and this repo is pretty much everything that comes up as a solution.

khs1994 commented 2 years ago

@kachkaev

on:
  push

name: ci

jobs:
  ci:
    runs-on: macos-12
    steps:
    - uses: docker-practice/actions-setup-docker@master
    - run: |
        set -x

        docker version

        docker run --rm hello-world
kachkaev commented 2 years ago

Thanks @khs1994! I must have misunderstood you when you shared the Homebrew link. I thought we'd need to use brew install ... ourselves instead of using the action. I just tried macos-12 with docker-practice/actions-setup-docker@1.0.11 and the workflow got stuck again. See related diff.

douglascamata commented 2 years ago

For those looking out for an alternative, I created https://github.com/douglascamata/setup-docker-action. I use Colima (Lima-VM under the hood) to set up Docker in macOS runners.

kachkaev commented 2 years ago

Thanks @douglascamata! I tried your action and it almost worked, I just missed docker-compose. Do you know a quick way of adding it?

I also tried new commit (https://github.com/docker-practice/actions-setup-docker/commit/82cea5df5890f0098e297b5f6f6c8d424ca406f6) – no luck so far.

douglascamata commented 2 years ago

@kachkaev to get docker-compose you just have to add a run step that will execute brew install docker-compose to your workflow.

kachkaev commented 2 years ago

Thanks @douglascamata! This worked:

      - name: Setup Docker on macOS
        uses: douglascamata/setup-docker-macos-action@v1-alpha

      - name: Install docker-compose
        run: HOMEBREW_NO_AUTO_UPDATE=1 brew install docker-compose

Actions took ≈ 4:15 and 0:10 seconds, respectively.

Hope to see docker-practice/actions-setup-docker@master fixed as well! 🤞

douglascamata commented 2 years ago

@kachkaev thanks for testing out. My action isn't the fastest, because installing Colima and all its dependencies with Homebrew takes some time. As you might have seen, I tried many different caching strategies but Homebrew doesn't like them much. Whenever Rancher Desktop, my current tool-of-choice to run Docker in macOS, adds supports for headless/CLI mode (see https://github.com/rancher-sandbox/rancher-desktop/issues/1407) it will be much faster: a single brew install --cask rancher-desktop plus a command to start the app together with the VM.