Add --add-host to resolve forgejo hostname in job containers

The job containers cannot resolve 'forgejo' Docker hostname.
Added 'options: --add-host=forgejo:10.100.0.2' to all container blocks.
This adds an entry to /etc/hosts mapping forgejo to the reachable IP.
This commit is contained in:
Bu5hm4nn
2026-03-21 23:35:07 +01:00
parent b85ebd5df9
commit ad2e13f924
2 changed files with 8 additions and 16 deletions

View File

@@ -15,8 +15,7 @@ jobs:
runs-on: docker
container:
image: catthehacker/ubuntu:act-latest
env:
GITHUB_SERVER_URL: ${{ vars.FORGEJO_URL || 'http://10.100.0.2:3000' }}
options: --add-host=forgejo:10.100.0.2
steps:
- uses: actions/checkout@v4
- name: Set up Python
@@ -36,8 +35,7 @@ jobs:
runs-on: docker
container:
image: catthehacker/ubuntu:act-latest
env:
GITHUB_SERVER_URL: ${{ vars.FORGEJO_URL || 'http://10.100.0.2:3000' }}
options: --add-host=forgejo:10.100.0.2
steps:
- uses: actions/checkout@v4
- name: Set up Python
@@ -55,8 +53,7 @@ jobs:
runs-on: docker
container:
image: catthehacker/ubuntu:act-latest
env:
GITHUB_SERVER_URL: ${{ vars.FORGEJO_URL || 'http://10.100.0.2:3000' }}
options: --add-host=forgejo:10.100.0.2
steps:
- uses: actions/checkout@v4
- name: Set up Python