Hey!
I tried to find documentation on this, but I couldn’t find anything.
When we have:
jobs:
job_name:
name: Job Name
runs-on: ubuntu-latest
container:
image: docker:latest
Does container
override runs-on
?
Or, does the job spin up a container with whatever image is assigned to ubuntu-latest
(in config.yaml
), which will then spin up a separate container running docker:latest
?
Note – in my env, both Gitea and the Actions Runner are running on docker. The Actions Runner spins up containers on the host’s docker.sock
.
–
For cases where I want to specify a volume to mount…
Is this something valid to do? Omitting container.image
, and specifying the image alias in runs-on
:
jobs:
job_name:
name: Job Name
runs-on: docker-latest
container:
volumes:
- /path1/:/path1/
Or, alternatively, omitting runs-on
:
jobs:
job_name:
name: Job Name
container:
image: docker:latest
volumes:
- /path1/:/path1/
–
In other words, what I’m looking for is to prevent doing this:
Actions Runner (running gitea/act_runner:latest
)
→ Spins up gitea/runner-images:ubuntu-latest
(based on runs-on
)
→ Spins up docker:latest
(based on container
)
And instead, do this:
Actions Runner (running gitea/act_runner:latest
)
→ Spins up docker:latest
(based on container
)
(for cases where I want to specify a volume
to be mounted, for that specific job, and hence the reason to use the container
node)
Thanks!