Skip to content

Self hosted runner - FATAL: No custom config file found on disk #793

Closed

Description

@DavidBertet

Hi,

I'm trying to run a fairly simple case on a self hosted runner environment

name: Renovate
on:
  # For testing purposes
  pull_request:
jobs:
  renovate:
    runs-on: self-hosted
    container:
      image: ubuntu:latest

    env:
      RENOVATE_VERSION: 37.31.3-full # renovate: datasource=docker depName=renovate packageName=ghcr.io/renovatebot/renovate
  
    steps:
      - name: Checkout
        uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0

      - name: Install Docker
        run: |
          apt-get -y update
          apt-get install -y ca-certificates curl gnupg
          install -m 0755 -d /etc/apt/keyrings
          curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
          chmod a+r /etc/apt/keyrings/docker.gpg

          # Add the repository to Apt sources:
          echo \
            "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
            "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
            tee /etc/apt/sources.list.d/docker.list > /dev/null
          apt-get -y update
          apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

      - name: Get token
        id: get_token
        uses: ./.github/actions/github-app-token
        with:
          private_key: ${{ secrets.GHA_PRIVATE_KEY }}
          app_id: ${{ secrets.GHA_APP_ID }}
  
      - name: Self-hosted Renovate
        uses: renovatebot/github-action@89c8a9b60f5bc8395658abab8f40f96e4b490ebf # v39.1.0
        env:
          RENOVATE_REPOSITORIES: ${{ github.repository }}

          RENOVATE_ONBOARDING: false
          RENOVATE_REQUIRE_CONFIG: false

          LOG_LEVEL: 'debug'          
          
        with:
          renovate-version: ${{ env.RENOVATE_VERSION }}
          configurationFile: "parallel-run/proxyapp/renovate.json"
          token: ${{ steps.get_token.outputs.token }}

But I'm getting this error, which I couldn't figure out

/usr/bin/docker run --env RENOVATE_VERSION --env RENOVATE_REPOSITORIES --env RENOVATE_ONBOARDING --env RENOVATE_REQUIRE_CONFIG --env LOG_LEVEL --env RENOVATE_TOKEN=*** --env RENOVATE_CONFIG_FILE=/github-action/renovate.json --volume /__w/parallel-run/proxyapp/renovate.json:/github-action/renovate.json --volume /tmp:/tmp --rm ghcr.io/renovatebot/renovate:37.31.3-full
DEBUG: Using RE2 as regex engine
DEBUG: Parsing configs
DEBUG: Checking for config file in /github-action/renovate.json
FATAL: No custom config file found on disk

/__w/parallel-run/proxyapp/renovate.json does exists, I can print it

If I put a wrong file, the action does throw the expected error configuration file '${configurationFile.value}' MUST be an existing file

It does work if I replace my own runner with Github's one

-    runs-on: self-hosted
-    container:
-      image: <ubuntu with docker>
+    runs-on: ubuntu-latest

Any idea?

Activity

  1. rarkins commented on Oct 24, 2023

    @rarkins
    Contributor

    Renovate cannot access /github-action/renovate.json

  2. viceice commented on Oct 24, 2023

    @viceice
    Member

    how do you run your self-hosted runner? maybe the config file is not readable by the renovate docker user.

  3. davidfrickert commented on Nov 26, 2023

    @davidfrickert

    For self hosted you can try running the renovate docker image directly, e.g.:
    (YMMV, this is using Gitea actions)

    name: Renovate bot
    
    on:
      push:
      schedule:
        - cron: 0 */3 * * *
    
    jobs:
      renovate:
        runs-on: self-hosted
        container:
          image: ghcr.io/renovatebot/renovate:latest
        steps:
          - name: Checkout
            uses: https://github.com/actions/checkout@v3.6.0
          - name: Run Renovate
            run: renovate
            env: 
              LOG_LEVEL: debug
              RENOVATE_TOKEN: ${{ secrets.RENOVATE_GITEA_TOKEN }}
              RENOVATE_CONFIG_FILE: /workspace/davidfrickert/renovate/global-cfg.json
    
  4. locked and limited conversation to collaborators on Jan 27, 2024
  5. converted this issue into a discussion #804 on Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Datasource

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions