Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI step hangs in GitHub Action #255

Closed
ruralocity opened this issue Aug 3, 2023 · 1 comment
Closed

CI step hangs in GitHub Action #255

ruralocity opened this issue Aug 3, 2023 · 1 comment

Comments

@ruralocity
Copy link

Hello, I'm trying to move a GitHub Actions CI workflow to use a pre-existing devcontainer configuration for a Ruby on Rails application. The configuration works locally in VS Code, but I'm having trouble getting it to run as an action. I have a feeling I'm missing something simple.

Following the "simplest example" code from the Getting Started docs:

name: CI
on:
  push:
    branches:
      - my-feature-branch
  pull_request:

jobs:
  tests:
    name: Run test suite
    runs-on: ubuntu-latest

    steps:
      - name: Check out code
        uses: actions/checkout@v3

      - name: Create environment files
        run: |
          cp .env.sample .env

      - name: Run CI
        uses: devcontainers/[email protected]
        with:
          runCmd: echo "Hello World!"

The workflow successfully builds the devcontainer, and I see it start up:

 [2023-08-03T22:20:18.662Z] Start: Run: docker-compose --project-name my-app_devcontainer -f /home/runner/work/my-app/my-app/.devcontainer/docker-compose.yml -f /tmp/devcontainercli-runner/docker-compose/docker-compose.devcontainer.build-1691101213357.yml -f /tmp/devcontainercli-runner/docker-compose/docker-compose.devcontainer.containerFeatures-1691101218661.yml up -d

But it hangs at that point, and never runs what I've set in runCmd.

Any guidance is appreciated, thanks!

@ruralocity
Copy link
Author

I figured out what was going on—a service I'd defined in the dev container's docker-compose causes CI to hang. I removed it with a workaround and can now build using the Action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant