Skip to content

Get self-hosted runner name #25707

Answered by adiroiban
adiroiban asked this question in Actions
Discussion options

You must be logged in to vote

I ended up with this option:

Each docker-engine hosts bare-metal has a file with default container variables

/srv/docker/default.env

Inside that variable it can have the URL to various services

The /srv/docker/default.env file is managed outside of GitHub Actions/Workflow.

The workflow looks like this.

jobs:

standard:

name: Container
container:
  image: ghcr.io/alpine/alpine:3.12
  options: --env-file /srv/docker/default.env
runs-on: docker-host
timeout-minutes: 45
steps:

# Executed inside the container.
- name: Alpine setup
  run: |
    apk update
    apk upgrade
    apk add shadow sudo bash git libffi
    echo $DOCKER_ENGINE_HOST

# Executed inside the container.
- uses: actions/checko…

Replies: 8 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants