devcontainers / devcontainers/ci

Suggestions to simplify image prebuilding

Open
#150 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
496
Forks
101
PR merge metrics
No merged PRs in 30d

Description

In my case, I am using this action to pre-build an image I then use in codespaces and remote - containers. I do this on a periodic basis for security, and do not need to execute anything in the container.

I was expecting to be able to do this:

```yaml
- name: Build image
uses: devcontainers/ci@v0.2
with:
imageName: ghcr.io/chuxel/devpacks/devcontainer
```

However, what I ended up needing to do was this:

```yaml
- name: Build image
uses: devcontainers/ci@v0.2
with:
imageName: ghcr.io/chuxel/devpacks/devcontainer
skipContainerUserIdUpdate: true
push: always
runCmd: echo "Image built successfully."
```

Would it be possible to alter the defaults so you didn't need quite so much knowledge of properties to do it? The behavior around `push` I found particularly confusing given Action's trigger system. I make heavy use of `workflow_dispatch` to simplify testing which didn't work even before I layered in the schedule.

Ideally if `runCmd` wasn't specified, it would just skip the container spin up for example.

Otherwise including a clear example for this scenario in the README and docs probably makes sense. //cc @stuartleeks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.