Skip to content

Compatibility with GHES #241

Description

@CiucurDaniel

I have GitHub Enterprise Server 3.18.9 provided by an external provider (different network outside of cloud space) which also provides some runners which we do not want to use because we need control over the base image and the tools installed. therefore, we have our own set of self-hosted runners based on ARC. I tried to deploy the github-actions-cache-server via helm and set both env vars:

        - name: ACTIONS_RESULTS_URL
          value: "http://cache-server-github-actions-cache-server.cache-server.svc.cluster.local:3000/"
        - name: ACTIONS_CACHE_URL
          value: "http://cache-server-github-actions-cache-server.cache-server.svc.cluster.local:3000/"

However it seems the cache action is still trying to go to a different cache server, the one from our GHES provider. This brings me to my main question.
Does the github-actions-cache-server work with GitHub Enterprise Server 3.18.9? Or could this be a different issue due to our provider already having some runners deployed?

Additional configuration bellow (as runner image we tried both the falcondev binary patch and the falcondev base image ):

FROM ghcr.io/actions/actions-runner:2.334.0

# Apply falcondev binary patch
RUN sed -i 's/\x41\x00\x43\x00\x54\x00\x49\x00\x4F\x00\x4E\x00\x53\x00\x5F\x00\x52\x00\x45\x00\x53\x00\x55\x00\x4C\x00\x54\x00\x53\x00\x5F\x00\x55\x00\x52\x00\x4C\x00/\x41\x00\x43\x00\x54\x00\x49\x00\x4F\x00\x4E\x00\x53\x00\x5F\x00\x52\x00\x45\x00\x53\x00\x55\x00\x4C\x00\x54\x00\x53\x00\x5F\x00\x4F\x00\x52\x00\x4C\x00/g' /home/runner/bin/Runner.Worker.dll

... install additional tools 
FROM ghcr.io/falcondev-oss/actions-runner:2.334.0

... install additional tools 

Pod Spec:

## template is the PodSpec for each runner Pod
## For reference: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#PodSpec
template:
  ## template.spec will be modified if you change the container mode
  ## with containerMode.type=dind, we will populate the template.spec with following pod spec
  ## template:
  spec:
    imagePullSecrets:
      - name: secret
    initContainers:
    - name: init-dind-externals
      #image: ghcr.io/actions/actions-runner:latest
      # INFO: this should match the base image that we use on our runners
      #image: ghcr.io/actions/actions-runner:2.334.0
      image: project.azurecr.io/devops/runner/self-hosted-runner:latest
      command: ["cp", "-r", "-v", "/home/runner/externals/.", "/home/runner/tmpDir/"]
      volumeMounts:
        - name: dind-externals
          mountPath: /home/runner/tmpDir
    containers:
    - name: runner
      #image: ghcr.io/actions/actions-runner:latest
      image: project.azurecr.io/devops/runner/self-hosted-runner:latest
      command: ["/home/runner/entrypoint.sh"]
      env:
        - name: DOCKER_HOST
          value: unix:///var/run/docker.sock
        # INFO: custom overwrite based on our cache server
        - name: ACTIONS_RESULTS_URL
          value: "http://cache-server-github-actions-cache-server.cache-server.svc.cluster.local:3000/"
        - name: ACTIONS_CACHE_URL
          value: "http://cache-server-github-actions-cache-server.cache-server.svc.cluster.local:3000/"
      volumeMounts:
        - name: docker-creds
          mountPath: /root/.docker
        - name: work
          mountPath: /home/runner/_work
        - name: dind-sock
          mountPath: /var/run
        - mountPath: /home/runner/cr-secret
          name: cr-secret
    - name: dind
      image: docker:dind
      args:
        - dockerd
        - '--default-address-pool=base=10.200.0.0/16,size=24'
        - '--bip=10.199.0.1/24'
        - '--host=unix:///var/run/docker.sock'
        - '--group=$(DOCKER_GROUP_GID)'
      env:
        - name: DOCKER_GROUP_GID
          value: "123"
      securityContext:
        privileged: true
      volumeMounts:
        - name: docker-creds
          mountPath: /root/.docker
        - name: work
          mountPath: /home/runner/_work
        - name: dind-sock
          mountPath: /var/run
        - name: dind-externals
          mountPath: /home/runner/externals

    volumes:
    - name: docker-creds
      emptyDir: {}
    - name: work
      emptyDir: {}
    - name: dind-sock
      emptyDir: {}
    - name: dind-externals
      emptyDir: {}
    - name: cr-secret
      secret:
        secretName: secret

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions