act
act copied to clipboard
Issue: parse all container/services options
on: push
jobs:
docker-container:
runs-on: ubuntu-latest
container:
image: alpine
options: --it --rm
steps:
- uses: actions/checkout@v2
bump
@bhaveshprajapat Feel free to create a pull request 😉
@cplee @alex-savchuk This change contains a major issue. The workflow below does not return the hostname of the host but some other invalid fqdn. I'm not sure why this happens, but it is a side-effect of this PR. Reverting it does restore the previous behavior.
name: test
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: hostname -f
According to the docs, if no container is set, the job should run on the host.
This was imitated with act until this fix was applied.
We should restore the default behavior unless there is a container definition on a job.
Checking it.
@KnisterPeter
Could you please provide output for previous output of hostname -f and new one?
I checked and see "docker-desktop" for both cases :(
The 'previous' output was the output of the host machine as act was used to start the docker container in network mode host. Now with your fix it is started with the default network mode.
As you are parsing an empty string into docker options (using the cli tool) the output are all the docker defaults. Then you merge that into (and over) the act defaults.
I've already build a fix for this: https://github.com/nektos/act/pull/1375
Please test if your change did not break with that. :smiley: