github.com/nektos/act@v0.2.63/pkg/runner/testdata/container-hostname/push.yml (about)

     1  name: container-hostname
     2  on: push
     3  
     4  defaults:
     5    run:
     6      shell: bash
     7  
     8  jobs:
     9    with-hostname:
    10      runs-on: ubuntu-latest
    11      container:
    12        image: node:16-buster-slim
    13        options: "--hostname my.host.local --user 100:101"
    14      steps:
    15        - run: |
    16            echo "UID: $(id -u)"
    17            echo "GID: $(id -g)"
    18            echo "HOST: $(uname -n)"
    19            [[ "$(id -u)" == "100" ]] && [[ "$(id -g)" == "101" ]] && [[ "$(uname -n)" == "my.host.local" ]]
    20  
    21    default-hostname:
    22      runs-on: ubuntu-latest
    23      container:
    24        image: node:16-buster-slim
    25      steps:
    26        - run: |
    27            echo "UID: $(id -u)"
    28            echo "GID: $(id -g)"
    29            echo "HOST: $(uname -n)"
    30            [[ "$(id -u)" == "0" ]] && [[ "$(id -g)" == "0" ]] && [[ $(uname -n) ]] && [[ "$(uname -n)" != "my.host.local" ]]