mirror of
https://gitea.com/gitea/act
synced 2024-11-27 07:08:57 +00:00
48188a6280
* fix: support docker create arguments from container.options (#1022) * fix processing of errors, add verbose logging, fix test * disable linter for code copied from docker/cli * fix all linter issues * Add license info * Add opts_test.go from docker/cli and required testdata Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
31 lines
797 B
YAML
31 lines
797 B
YAML
name: container-hostname
|
|
on: push
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
with-hostname:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: node:16-buster-slim
|
|
options: "--hostname my.host.local --user 100:101"
|
|
steps:
|
|
- run: |
|
|
echo "UID: $(id -u)"
|
|
echo "GID: $(id -g)"
|
|
echo "HOST: $(uname -n)"
|
|
[[ "$(id -u)" == "100" ]] && [[ "$(id -g)" == "101" ]] && [[ "$(uname -n)" == "my.host.local" ]]
|
|
|
|
default-hostname:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: node:16-buster-slim
|
|
steps:
|
|
- run: |
|
|
echo "UID: $(id -u)"
|
|
echo "GID: $(id -g)"
|
|
echo "HOST: $(uname -n)"
|
|
[[ "$(id -u)" == "0" ]] && [[ "$(id -g)" == "0" ]] && [[ $(uname -n) ]] && [[ "$(uname -n)" != "my.host.local" ]]
|