support for container option: --hostname (#809)

This commit is contained in:
Marcin Falkowski
2021-09-10 07:03:40 +02:00
committed by GitHub
parent f0fd0af5ce
commit 9126f15aa2
6 changed files with 53 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
name: container-hostname
on: push
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" ]]