actions / actions/runner-container-hooks
Bug: Using kubernetes-novolume mode breaks composite actions — runner cannot find action.yml under RUNNER_WORKSPACE
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 153
- Forks
- 112
- Avg merge
- 6m
- Merged PRs (30d)
- 1
Description
Summary
After migrating our GitHub Actions Runner Scale Set from containerMode: kubernetes (with kubernetesModeWorkVolumeClaim) to the new containerMode: kubernetes-novolume implementation, composite actions can no longer resolve their local paths.
We receive the following error:
Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/home/runner/_work/cloudburst/cloudburst/.github/workflows/playwright-test'. Did you forget to run actions/checkout before running your local action?
✔ Previous (Working) Configuration — kubernetes mode (with PVC)
RunnerScaleSet values:
runner-e2e:
containerMode:
type: "kubernetes"
kubernetesModeWorkVolumeClaim:
accessModes: ["ReadWriteOnce"]
storageClassName: "github-runners-sc"
resources:
requests:
storage: 10Gi
template:
spec:
containers:
- name: runner
env:
- name: ACTIONS_RUNNER_CONTAINER_HOOK_TEMPLATE
value: /home/runner/pod-templates/default.yaml
volumes:
- name: hook-extension
configMap:
name: runner-e2e-hook-extension
Hook extension (ConfigMap):
data:
default.yaml: |
apiVersion: v1
kind: PodTemplate
spec:
serviceAccountName: runner-e2e
resources:
requests:
memory: "8Gi"
cpu: "3000m"
containers:
- name: "$job"
imagePullPolicy: Always
➡ This configuration works.
Local composite actions are found under:
/home/runner/_work///.github/...
❌ New (Failing) Configuration — kubernetes-novolume mode
runner-e2e:
containerMode:
type: "kubernetes-novolume"
template:
metadata:
labels:
pod-type: runner
spec:
containers:
- name: runner
env:
- name: ACTIONS_RUNNER_CONTAINER_HOOKS
value: /home/runner/k8s-novolume/index.js
- name: ACTIONS_RUNNER_CONTAINER_HOOK_TEMPLATE
value: /home/runner/k8s-novolume/pod-templates/default.yaml
volumeMounts:
- name: hook-extension
mountPath: /home/runner/k8s-novolume/pod-templates
Hook extension (ConfigMap):
data:
default.yaml: |
apiVersion: v1
kind: PodTemplate
spec:
serviceAccountName: runner-e2e
nodeSelector:
karpenter.sh/nodepool: github-arc
containers:
- name: "$job"
env:
- name: RUNNER_WORKSPACE
value: /__w
- name: GITHUB_WORKSPACE
value: /__w/cloudburst
❗ Observed Behavior
The job container tries to locate composite action files under:
/home/runner/_work/cloudburst/cloudburst/.github/workflows/playwright-test
But with kubernetes-novolume, the actual workspace appears to be:
/__w/cloudburst/cloudburst
Additionally, /home/runner/_work does not exist at all inside the job container.
This mismatch causes composite actions to fail with:
Can't find 'action.yml', 'action.yaml' or 'Dockerfile'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the kubernetes-novolume hook at /home/runner/k8s-novolume/index.js and the mounted pod-templates/default.yaml. Compare how RUNNER_WORKSPACE and GITHUB_WORKSPACE are set against the working kubernetes configuration and the observed /home/runner/_work versus /__w paths. Done means local composite actions resolve their action.yml, action.yaml, or Dockerfile paths in the job container.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, kubernetes, typescript
- Domain
- ci-cd, devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100