title: Is it possible to define host mappings in GitHub Actions?
body: <p>Now I am using GitHub Actions to build my project. On my local machine, I define the local host address mapping in <code>/etc/hosts</code> like this:</p>
  <pre><code>11.19.178.213 postgres.dolphin.com
  </code></pre>
  <p>and in my database config like this:</p>
  <pre><code>spring.datasource.druid.post.master.jdbc-url = jdbc:postgresql://postgres.dolphin.com:5432/dolphin
  </code></pre>
  <p>On my production server I could edit the mapping to locate a different IP address of my database. But now I am running unit tests in GitHub Actions. How do I edit the host mapping to make the database mapping to container of GitHub Actions? I defined the container in GitHub Actions like this:</p>
  <pre><code>jobs:
    build:
      runs-on: ubuntu-latest
      services:
        postgres:
          image: postgres:13.2
          env:
            POSTGRES_PASSWORD: postgrespassword
            POSTGRES_DB: dolphin
            POSTGRES_USER: postgres
          ports:
            - 5432:5432
          options: &gt;-
            --health-cmd pg_isready
            --health-interval 10s
            --health-timeout 5s
            --health-retries 5
  </code></pre>
  <p>What should I do to handle the host mapping? I have already searched the docs, but I have found nothing about this problem?</p>