Skip to content

Using a container action requires an entrypoint to be specified #76

@AlexLukasT

Description

@AlexLukasT

Hey,

I'm using the k8s hooks together with the Actions Runner Controller.

When I'm using a container action like this:

jobs:
  test:
    container: ubuntu:latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Custom action
        uses: ./.github/actions/test-action

with the custom action

runs:
  using: docker
  image: "docker://debian:buster"
  entrypoint: "bin/bash"  # this line is required!
  args:
    - "-c"
    - "ls"

it will correctly create the Debian container but requires the entrypoint to be specified.

I checked the input the hook receives and the entrypoint there is empty when it is not specified in the action explicitly.
This leads to it being overridden by the default one (tail -f /dev/null) which causes the container and the job to hang indefinitely.
I would expect that it falls back to the default endpoint of the image.

This problem blocks any usage of public actions that use containers without specifying an entrypoint.

To be honest, I'm also not 100% sure if this is an issue with this project or the ARC.
Or is there a way to distinguish if the job is from a container action and use the default entrypoint of the image?

I'm using the latest version of the k8s hooks (v0.3.1) and the ARC (v0.27.3).

Thanks a lot for your help!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions