diff --git a/action.yml b/action.yml index 25ba7f6..6f3bb93 100644 --- a/action.yml +++ b/action.yml @@ -21,6 +21,14 @@ inputs: description: 'Stop the buildkitd container after the job (idle cleanup; container restarts on demand on the next run)' required: false default: 'true' + network: + description: 'Docker network for the buildkitd container — MUST match the network the job containers run on, otherwise the name is unresolvable' + required: false + default: 'git_default' + port: + description: 'TCP port buildkitd listens on' + required: false + default: '8375' runs: using: 'composite' @@ -30,16 +38,17 @@ runs: run: | docker ps -a --format '{{.Names}}' | grep -qx '${{ inputs.container_name }}' || \ docker run -d --name ${{ inputs.container_name }} --privileged \ + --network ${{ inputs.network }} \ --restart unless-stopped \ --label com.centurylinklabs.watchtower.monitor-only=${{ inputs.monitor_only }} \ --label dockhand.notify=${{ inputs.dockhand_notify }} \ - ${{ inputs.image }} + ${{ inputs.image }} --addr tcp://0.0.0.0:${{ inputs.port }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v4 with: driver: remote - endpoint: docker-container://${{ inputs.container_name }} + endpoint: tcp://${{ inputs.container_name }}:${{ inputs.port }} - name: Stop BuildKit (idle cleanup) if: ${{ inputs.cleanup == 'true' && always() }}