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

Error: The environment variable ImageOS must be set ruby/setup-ruby action #52

Open
everspader opened this issue Sep 22, 2021 · 4 comments

Comments

@everspader
Copy link

I'm running in the following error after the latest update of the action.
I think it's related to this in the new release.
because the ruby-setup action requires the ImageOS to be set for self-hosted runners.
How can this be fixed?

Error logging:

> Run lewagon/wait-on-check-action@master
  with:
    ref: bd8138c7d32e5e0296a3a4fa6f2a8ad080e4fd6d
    repo-token: ***
    check-name: Build base test image
    allowed-conclusions: success,skipped
    wait-interval: 10
    verbose: true
  env:
    POSTGRES_HOST: postgres
    POSTGRES_PORT: 5432
    POSTGRES_PASSWORD: admin
    POSTGRES_USER: postgres
> Run ruby/[email protected]
  with:
    ruby-version: 2.7
    bundler: default
    bundler-cache: false
    working-directory: .
    cache-version: 0
  env:
    POSTGRES_HOST: postgres
    POSTGRES_PORT: 5432
    POSTGRES_PASSWORD: admin
    POSTGRES_USER: postgres
/usr/bin/docker exec  e381481xxx sh -c "cat /etc/*release | grep ^ID"
Error: The environment variable ImageOS must be set
@matiasalbarello
Copy link
Contributor

Hi @everspader, thanks for your report. Could you share your yaml?

@everspader
Copy link
Author

This is my CI workflow. I'm currently using version v1.0.0 and it works nicely but it breaks with @master. I have a similar workflow for building on my staging branch that didn't seem to be affected.

name: project-ci

on:
  pull_request:

jobs:
    name: Detect changes
    runs-on: ubuntu-latest

    outputs:
      docker: ${{ steps.changes.outputs.docker }}

    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Check modified source
        uses: dorny/paths-filter@v2
        id: changes
        with:
          filters: |
            docker:
              - 'requirements.txt'

  build-test-image:
    needs: [detect-changes]
    name: Build base test image
    # Build a base docker image conditionally if previous job detected any change to requirements.txt
    # ...

  run-tests:
    name: Run tests
    runs-on: ubuntu-latest

    container:
      image: <my_image_from_previous_job>
      credentials:
        username: <username>
        password: <password>

    steps:
      - name: Wait for base image to be built
        uses: lewagon/[email protected]
        with:
          ref: ${{ github.sha }}
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          check-name: 'Build base test image'
          allowed-conclusions: success,skipped

      - name: Checkout repository
        uses: actions/checkout@v2

     # ...

@matiasalbarello
Copy link
Contributor

Hi @everspader. I'll need some time to see this issue in detail. Apparently, some adjustments need to be done in order to use the last version of this action on some self-hosted runners. Please keep using the previous stable version (1.0.0) as it works for you and there are no new features in the last release but only support to macOS and Windows GH runners.

@ppamorim
Copy link

ppamorim commented Feb 14, 2023

Same happening with Linux Alpine builds.

It's happening to non alpine builds too. IE:

runs-on: ubuntu-latest
container: node:14.17.1

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

3 participants