act/pkg/runner/testdata/container-hostname/push.yml
Ryan e9ae7894e3
fix: set sh as default shell for containers (#853)
* fix: set default shell for containers to sh

This matches GitHub Actions behaviour where,
runners use bash since it's guaranteed to exist there
while containers use sh for compatibility

* tests: fixup for default shell
2021-11-03 11:47:47 -07:00

24 lines
472 B
YAML

name: container-hostname
on: push
defaults:
run:
shell: bash
jobs:
with-hostname:
runs-on: ubuntu-latest
container:
image: node:12-buster-slim
options: "--hostname my.host.local"
steps:
- run: |
[[ $(uname -n) == "my.host.local" ]]
default-hostname:
runs-on: ubuntu-latest
container:
image: node:12-buster-slim
steps:
- run: |
[[ $(uname -n) ]] && [[ $(uname -n) != "my.host.local" ]]