Skip to content

Commit ee7e6b9

Browse files
Copilotmariuz
authored andcommitted
Add event_port input for Firebird RemoteAuxPort support
Agent-Logs-Url: https://github.com/mariuz/firebirdsql-github-action/sessions/f4b0b19b-635d-4ac1-997b-b2174e1173ee Co-authored-by: mariuz <18359+mariuz@users.noreply.github.com>
1 parent 4df0efe commit ee7e6b9

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ echo 'SELECT * FROM rdb$database;' | \
5050
`port`
5151
> Optional port published in the host for connecting to the database. Default 3050.
5252

53+
`event_port`
54+
> Optional port for Firebird database events (`RemoteAuxPort`). If set, configures `RemoteAuxPort` in `firebird.conf` and publishes the port on the host. This is required when using Firebird event listeners from outside the container.
55+
5356
`firebird_database`
5457
> Optional name for creating a database with the container
5558

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ inputs:
1515
description: 'Port published in the host for connecting to the database. Default: 3050.'
1616
required: false
1717
default: '3050'
18+
event_port:
19+
description: 'Optional port for Firebird events (RemoteAuxPort). If set, configures RemoteAuxPort in firebird.conf and publishes the port. Default: empty (disabled).'
20+
required: false
21+
default: ''
1822
firebird_database:
1923
description: 'Optional name for creating a database inside the container'
2024
required: false

entrypoint.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,17 @@ if [ -n "${INPUT_VOLUMES:-}" ]; then
7777
IFS="${OLD_IFS}"
7878
fi
7979

80-
echo "# Creating the FirebirdSQL Container: docker run --detach --name ${INPUT_CONTAINER_NAME:-firebirdsql} --publish ${INPUT_PORT:-3050}:3050 ${env_list} ${volumes_arg} firebirdsql/firebird:${INPUT_VERSION:-latest}"
80+
event_port_arg=''
81+
if [ -n "${INPUT_EVENT_PORT:-}" ]; then
82+
printf '# Publishing event port (RemoteAuxPort): %s\n' "${INPUT_EVENT_PORT}"
83+
env_list="${env_list} --env FIREBIRD_CONF_RemoteAuxPort=${INPUT_EVENT_PORT}"
84+
event_port_arg="--publish ${INPUT_EVENT_PORT}:${INPUT_EVENT_PORT}"
85+
fi
86+
87+
echo "# Creating the FirebirdSQL Container: docker run --detach --name ${INPUT_CONTAINER_NAME:-firebirdsql} --publish ${INPUT_PORT:-3050}:3050 ${env_list} ${event_port_arg} ${volumes_arg} firebirdsql/firebird:${INPUT_VERSION:-latest}"
8188

8289
# shellcheck disable=SC2086
83-
if ! docker run --detach --name "${INPUT_CONTAINER_NAME:-firebirdsql}" --publish "${INPUT_PORT:-3050}:3050" ${network_arg} ${env_list} ${volumes_arg} "firebirdsql/firebird:${INPUT_VERSION:-latest}" ; then
90+
if ! docker run --detach --name "${INPUT_CONTAINER_NAME:-firebirdsql}" --publish "${INPUT_PORT:-3050}:3050" ${network_arg} ${env_list} ${event_port_arg} ${volumes_arg} "firebirdsql/firebird:${INPUT_VERSION:-latest}" ; then
8491
echo "## Failed to create the FirebirdSQL container! ##"
8592
exit 11
8693
fi

0 commit comments

Comments
 (0)