Skip to content

Commit cb274c5

Browse files
committed
refact: replace app_folder to container_workdir
1 parent 280bb02 commit cb274c5

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Any arbitrary arguments can be passed to composer by using the `args` input, how
6969
+ `php_version` - Choose which version of PHP you want to use - x.y (default `latest`) (e.g. `7.4.29`, 8.2`, or any version listed on https://www.php.net/releases/index.php)
7070
+ `version` - Choose which version of Composer you want to use - default `latest` (e.g. `1.10`, `2.3`, `2.5.4`)
7171
+ `memory_limit` - Sets the composer memory limit - (default _empty_)
72-
+ `app_folder` - Sets the aplication folder - (default /app)
72+
+ `container_workdir` - Sets the aplication workdir inside container - (default /app)
7373

7474
There are also SSH input available: `ssh_key`, `ssh_key_pub` and `ssh_domain` that are used for depending on private repositories. See below for more information on usage.
7575

action.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ inputs:
7373
description: "Sets the composer memory limit"
7474
required: false
7575

76-
app_folder:
77-
description: "Sets the aplication folder"
76+
container_workdir:
77+
description: "Sets the aplication workdir inside container"
7878
required: false
7979

8080
outputs:
@@ -103,7 +103,7 @@ runs:
103103
ACTION_SSH_PORT: ${{ inputs.ssh_port }}
104104
ACTION_WORKING_DIR: ${{ inputs.working_dir }}
105105
ACTION_MEMORY_LIMIT: ${{ inputs.memory_limit }}
106-
ACTION_APP_FOLDER: ${{ inputs.app_folder }}
106+
ACTION_CONTAINER_WORKDIR: ${{ inputs.container_workdir }}
107107
id: composer_run
108108
run: |
109109
set -e

composer-action.bash

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -e
33

4-
app_folder="/app"
4+
container_workdir="/app"
55
github_action_path=$(dirname "$0")
66
docker_tag=$(cat ./docker_tag)
77
echo "Docker tag: $docker_tag" >> output.log 2>&1
@@ -196,8 +196,8 @@ do
196196
fi
197197
done <<<$(env)
198198

199-
if [ -z "$ACTION_APP_FOLDER" ]; then
200-
app_folder="${ACTION_APP_FOLDER}"
199+
if [ -z "$ACTION_CONTAINER_WORKDIR" ]; then
200+
container_workdir="${ACTION_CONTAINER_WORKDIR}"
201201
fi
202202

203203
echo "name=full_command::${command_string}" >> $GITHUB_OUTPUT
@@ -208,7 +208,7 @@ docker run --rm \
208208
--volume ~/.ssh:/root/.ssh \
209209
--volume "${GITHUB_WORKSPACE}":/app \
210210
--volume "/tmp/composer-cache":/tmp/composer-cache \
211-
--workdir ${app_folder} \
211+
--workdir ${container_workdir} \
212212
--env-file ./DOCKER_ENV \
213213
--network host \
214214
${memory_limit} \

0 commit comments

Comments
 (0)