e9ae7894e3
* 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
24 lines
472 B
YAML
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" ]]
|